2011-08-13, 04:02 PM
Quote:Erm.. not quite. The "UserDir" directive is for someone to visit http://yourmachine/~fred - and they get dropped into /home/fred/public_html. In most cases, you can safely leave UserDir commented out.
Just how it is explained in the httpd.conf file:
<ifmodule mod_userdir.c></ifmodule>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir disable
#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disable" line above, and uncomment
# the following line instead:
#
UserDir public_html
(places like Universities and so tend to use it to allow every user to have their own public webspace, but it's not advised)
Code:
# Custom virtualhosts
NameVirtualHost ipadress:80
<VirtualHost ipadress:80>
## -- DEFAULT: should NEVER get here normally!
ServerName nothing.here
ServerAdmin abuse@127.0.0.1
DocumentRoot /var/www/html/
ErrorLog /var/log/httpd/sniffer_error.log
CustomLog /var/log/httpd/sniffer_access.log combined
Loglevel warn
ScriptAlias /cgi-bin /websites/.blackhole
okay.. this looks like something I wrote... don't forget that /websites/.blackhole should exist as a directory.
If it isn't, change it to:
Code:
Alias /cgi-bin/ /var/www/html
- this will just redirect people sniffing your cgi-bin area.
Code:
<VirtualHost ipadress:80>
ServerAlias www.feedmebits.nl
ServerAdmin maarten@feedmebits.nl
DocumentRoot /home/www/public_html/feedmebits.nl
ServerName feedmebits.nl
ErrorLog /log/httpd/websites/feedmebits.nl/error.log
CustomLog /logs/httpd/websites/feedmebits.nl/access.log combined
<Directory /home/www/public_html/feedmebits.nl>
AllowOverride None
order allow,deny
allow from all
Options Indexes Includes FollowSymLinks
</Directory>
</VirtualHost>
okay.. kinda on the right track there - but check that the path for your CustomLogs exists (do you have a /logs/httpd dir?).
Quote:I made a normal html page(index.htm) for my blackhole cuz I wasn't exactly sure how to finish it off.okay - you're missing one final directive: add the following line into your bucket host (the first VirtualHost):
But when I go there(using my ip) I just get my normal apache test page and when I do ip/index.htm I get the page(blackhole)
Code:
DirectoryIndex index.htm
The reason you're getting the "welcome to apache!" page is that in your conf.d directory is a file called "welcome.conf" that redirects 403 errors to a welcome page. And as you've not added "Index +Options" on (which you shouldn't, anyway), apache can't find your DirecoryIndex file, fails to serve up a directory listing so then generates a 403 error - which welcome.conf shows as a nice welcome page.
(there have been arguments in the Apache group as to if this is a good thing or not).
Quote:I just set my domein name to my ip today so I think it takes 24-48 hours before that's active.Under your ServerName directive, add in something like "ServerAlias feedme.testbed" then add feedme.testbed to your local hosts file. That way, your browser will resolve it to the server IP, and Apache will serve up the same content as though it was feedmebits.nl.
However I am not able to see my website now which is under /home/www/public_html
Quote:Will still do some more searching, but it's first time working with apache so I haven't figured outI'll have to say - I'm impressed that you've read around and had a go, and had quite a measure of success - you deserve it!
what I did wrong yet. After I get this sorted out and working I will have a go for installing/configuring suPHP.
Just as a last touch: don't forget to check the apache logfiles, in particular /var/log/httpd/error_log - this often contains some useful information about apache failing/doing odd things.