Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Apache/websites
#7

Quote: 

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

 
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.

 

(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.

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)
okay - you're missing one final directive: add the following line into your bucket host (the first VirtualHost):



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.

However I am not able to see my website now which is under /home/www/public_html
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.

 

 

Quote:Will still do some more searching, but it's first time working with apache so I haven't figured out

what I did wrong yet. After I get this sorted out and working I will have a go for installing/configuring suPHP.
I'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!

 

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.

Reply


Messages In This Thread
Apache/websites - by inittux - 2011-08-12, 05:48 AM
Apache/websites - by Dungeon-Dave - 2011-08-12, 07:00 PM
Apache/websites - by inittux - 2011-08-13, 05:11 AM
Apache/websites - by Dungeon-Dave - 2011-08-13, 06:43 AM
Apache/websites - by inittux - 2011-08-13, 07:32 AM
Apache/websites - by inittux - 2011-08-13, 12:03 PM
Apache/websites - by Dungeon-Dave - 2011-08-13, 04:02 PM
Apache/websites - by Dungeon-Dave - 2011-08-13, 04:10 PM
Apache/websites - by inittux - 2011-08-13, 04:31 PM
Apache/websites - by Dungeon-Dave - 2011-08-14, 07:47 AM
Apache/websites - by inittux - 2011-08-14, 08:02 AM
Apache/websites - by inittux - 2011-08-14, 10:03 AM
Apache/websites - by inittux - 2011-08-14, 02:00 PM
Apache/websites - by Dungeon-Dave - 2011-08-14, 04:23 PM
Apache/websites - by Dungeon-Dave - 2011-08-14, 04:32 PM
Apache/websites - by Dungeon-Dave - 2011-08-14, 04:35 PM
Apache/websites - by inittux - 2011-08-14, 04:37 PM
Apache/websites - by inittux - 2011-08-14, 04:41 PM
Apache/websites - by inittux - 2011-08-14, 05:05 PM
Apache/websites - by Dungeon-Dave - 2011-08-14, 05:33 PM
Apache/websites - by inittux - 2011-08-14, 06:27 PM
Apache/websites - by Dungeon-Dave - 2011-08-14, 08:04 PM
Apache/websites - by inittux - 2011-08-14, 08:22 PM
Apache/websites - by inittux - 2011-08-15, 11:07 AM
Apache/websites - by Dungeon-Dave - 2011-08-15, 03:47 PM
Apache/websites - by inittux - 2011-08-15, 04:09 PM
Apache/websites - by inittux - 2011-08-15, 04:47 PM
Apache/websites - by Dungeon-Dave - 2011-08-15, 06:10 PM
Apache/websites - by inittux - 2011-08-16, 03:59 AM
Apache/websites - by inittux - 2011-08-16, 05:57 AM
Apache/websites - by Dungeon-Dave - 2011-08-16, 02:48 PM
Apache/websites - by inittux - 2011-08-16, 03:17 PM
Apache/websites - by Dungeon-Dave - 2011-08-16, 03:45 PM
Apache/websites - by inittux - 2011-08-16, 04:24 PM
Apache/websites - by inittux - 2011-08-16, 06:33 PM
Apache/websites - by Dungeon-Dave - 2011-08-16, 06:54 PM
Apache/websites - by inittux - 2011-08-16, 07:01 PM
Apache/websites - by Dungeon-Dave - 2011-08-17, 08:40 AM
Apache/websites - by inittux - 2011-08-17, 09:37 AM
Apache/websites - by Dungeon-Dave - 2011-08-17, 10:52 AM
Apache/websites - by inittux - 2011-08-17, 11:22 AM
Apache/websites - by Dungeon-Dave - 2011-08-17, 07:05 PM
Apache/websites - by inittux - 2011-08-17, 07:47 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)