Results 1 to 3 of 3

Thread: 404 Not Found Webuser1

  1. #1
    Join Date
    Apr 2014
    Beans
    33

    404 Not Found Webuser1

    Hi guys

    I was following the information on this: http://www.techsupportalert.com/how-...web-server.htm

    I get as far as testing the webuser site. (192.168.0.7/webuser)

    All i get is a 404 Not Found.

    my basic 192.168.0.7 is showing as the default ubuntu page.

    Where am i meant to be saving the html files. the user setup details are as follows:

    Code:
    root@webserver1:/etc# cd /var/www
    root@webserver1:/var/www# mkdir webuser1
    root@webserver1:/var/www# useradd webuser1 -p **** -d /var/www/webuser1 -s /bin/false
    root@webserver1:/var/www# chown webuser1 webuser1
    root@webserver1:/var/www# passwd webuser1
    Enter new UNIX password:
    Retype new UNIX password:
    passwd: password updated sucessfully

    I connect via the terminal on my laptop. Running Ubuntu.

    I know how to put items on there.. but i am unsure where to put the html file.

    Wouldn't it come up with something anyway rather than 404 Not Found....

    Please Help

  2. #2
    Join Date
    Mar 2008
    Location
    Birmingham, UK
    Beans
    Hidden!

    Re: 404 Not Found Webuser1

    Yep, a 404 would be expected. Apache in Ubuntu uses /var/www as the document root, so if it is listening on 192.168.0.7 (local network) it will serve the contents of /var/www when you ask it to. It will serve index.html or index.htm if it exists when you request a folder name (e.g. 192.168.0.7 or 192.168.0.7/webuser1). Also it will try and serve index.php etc. if you have PHP or other scripting languages installed and configured.

    If /var/www/webuser1 is an empty directory, requesting 192.168.0.7/webuser1 will return a 404 (not found) error. This is because your request translates looking in the /var/www/webuser1/ folder for a file named index.html, index.htm (or index.php etc.). When Apache can't find it, it returns a 404. If you put something like the following in /var/www/webuser1/index.html it should be output when you next surf there.
    Code:
    <html>
      <body>
        <p>Hello!</p>
      </body>
    </html>
    Desktop: Phenom 955 BE | GA-MA790XT-UD4P | 8GB TG Elite 1600 | BFG GTX 275
    Conky Screenshots | Last.fm | New to Ubuntu?

  3. #3
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: 404 Not Found Webuser1

    Which version of Ubuntu server are you using? The default folder for placing the index.html or index.php file used to be /var/www. I believe in recent versions it was changed to /var/www/html.
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •