Unable to access user-specific site after Debian setup

Hi all,

I have setup my Linode as a Debian 5.0 build, following the info on the wiki. I have setup a user account (/home/finalfurlong/) with a public_html folder, but attempting to access anything in that account does not work. (Using http://74.207.224.235/~finalfurlong/)

This is the wiki I followed: https://www.linode.com/wiki/index.php/User:Kangaby

Any suggestions?

Thanks!

14 Replies

As a stab in the dark, did you set the ServerName (and potentially the ServerAlias) correctly ? (here in the tutorial).

I believe so…my finalfurlong.org file in that folder is:

 <virtualhost 74.207.224.235:80="">ServerName finalfurlong.org
        ServerAlias www.finalfurlong.org
        DocumentRoot "/home/finalfurlong/public_html"
        ScriptAlias /cgi-bin/ /home/finalfurlong/cgi-bin/</virtualhost> 

As an update, www.finalfurlong.org now shows the default "It works" page (since the DNS has finished propogating), but if I add other pages to /home/finalfurlong/public_html/, those give a 404 error.

EDIT: just read your post :)

Have you checked the permissions on the files you've created ? They should be accessible via www.finalfurlong.org/foo.html. If your php pages are not loading, try creating a phpinfo() page first, to check your settings.

Well, http://www.finalfurlong.org is working fine from here.

If you want (for some unknown reason) to be able to access it from [http://finalfurlong.org/~finalfurlong" target="_blank">http://finalfurlong.org/~finalfurlong](

Yes, it's "working", but as I said above, I cannot access any other files. I don't need to access http://www.finalfurlong.org/~finalfurlong/, but I do need to be able to display something other than the default "It works!" text, which is exciting/interesting for about 5 seconds. ;)

Bugger – my typing is not up to speed.

Anyway, permissions or php settings are the most likely culprits.

If you followed that Debian Etch guide on your Debian Lenny server, then you've probably got NameVirtualHost *:80 in /etc/apache2/ports.conf as well as NameVirtualHost 74.207.224.235:80 in /etc/apache2/sites-available/default.

Deleting either will probably fix it. Since you're using (as opposed to wildcard * ) you can probably just comment the entry out of /etc/apache2/ports.conf, restart apache and see if it improves.

Additionally if you wanted access via http://74.207.224.235/~finalfurlong as well, try enabling the userdir module for Apache (a2enmod userdir) and then reloading Apache.

@condate:

If you followed that Debian Etch guide on your

Additionally if you wanted access via http://74.207.224.235/~finalfurlong as well, try enabling the userdir module for Apache (a2enmod userdir) and then reloading Apache.

Removing the duplicate NameVirtualServer thing didn't do much, but adding the userdir module did help. :) Now I can access http://www.finalfurlong.org/ (ironically not http://74.207.224.235/~finalfurlong, but that's ok).

So thanks!

My next issue is that now that I've uploaded all my files to /home/finalfurlong/public_html/, it doesn't want to display them. I originally created info.php via the command line that is just a phpinfo() page, and that works. I've also uploaded another few hundred files, though, and none of those are recognized via the browser.

I did upload them as root, but then via command line changed their owner/group to finalfurlong.

Do I need to do anything else?

Thanks again.

Check that www-data (the user Apache's running as, according to phpinfo()) can read the files. I.e. chmod o+r *, or chown finalfurlong:www-data *. By default, it should be fine unless you have a umask set.

I swapped to the www-data, but no luck. :(

Just to double check:

ls -alh /home/finalfurlong/public_html/

Any oddities ?

If you were able to create the info.php page, and Apache can see it but no other files in that directory, then either there must be some .htaccess rule in the way (unlikely, as it's a fresh install), or the mime type is being ignored for some reason.

I can access:

http://www.finalfurlong.org/ - and get a page

http://www.finalfurlong.org/~finalfurlong/ - and get a directory

http://www.finalfurlong.org/~finalfurlo … rlong.org/">http://www.finalfurlong.org/~finalfurlong/finalfurlong.org/ - and get a directory

http://www.finalfurlong.org/~finalfurlo … rg/public/">http://www.finalfurlong.org/~finalfurlong/finalfurlong.org/public/ - and get a page

You've got some weird kind of structure going on.

It appears that the user finalfurlong owns multiple sites -

finalfurlong.org and tohorse.com both under /home/finalfurlong or /var/www/finalfurlong

What is the index page in each of your sites? It will need to be either index.html or index.php - If you are using php, have you added index.php to the apache index pages directive (can't remember the real name of that) in the apache configuration file. Etch did it for me automatically, Lenny may not.

Does it work with index.html?

It looks like the userdir.conf probably enables Indexes which accounts for the directory listing..

interestingly http://www.finalfurlong.org/index.php works, but index.html is obviously automatically picked up first.

@equestrianerd:

I believe so…my finalfurlong.org file in that folder is:

 <virtualhost 74.207.224.235:80="">ServerName finalfurlong.org
        ServerAlias www.finalfurlong.org
        DocumentRoot "/home/finalfurlong/public_html"
        ScriptAlias /cgi-bin/ /home/finalfurlong/cgi-bin/</virtualhost> 

I suspect that DocumentRoot should be:

       DocumentRoot "/home/finalfurlong/finalfurlong.org/public_html"

based on what I can see from above. (maybe)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct