Vhost....Again

So i decided to reinstall opensuse today. I learned alot getting it setup to the point that i had it and thought i would like to see if i can do it again.

I did everything the exact same way as before with my vhosts, and i guess it is working. They point to the correct place, but before if public_html was empty it would give an error

Access forbidden!

You don’t have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.

Now i just get an Index of / with an empty page…
but if i go to a directory that does not exist i get the desired access forbidden message

why would i be getting different results and what can i do to?

also rather than post another topic. I tried to install OpenSUSE on my laptop with same dvd I just used to install on desktop… Desktop installed without a hitch, Laptop fails and says cannot build repository… I searched forum and nothing seems to apply as it will install on my desktop?

also i notice that public_html has a .directory file that was never there before so i deleted it.

When i look in my apache error log it says

[Mon Jul 07 23:28:44 2008] [error] [client 192.168.1.1] File does not exist: /home/xxxxx/public_html/favicon.ico

why would it be trying to find that?

In the original default server in /etc/apache2/default-server.conf there is this line inside the stanza for <Directory “/srv/www/htdocs”>

Options None

This forbids Indexes also so people can’t see what’s in the directory, they have to ask for index.html either explicitly or implicitly through a DirectoryIndex directive.

If you want to do the same for your vhosts, then use the Options directive to set it how you want in the vhost’s directives.

A non-existent directory or file is always an error, but you can trap 404 errors and provide a more meaningful page if you like, using the ErrorDocument directive.

Browsers look for that. Look at the location bar when on this forum website. See that icon next to the URL? You can put any interesting icons on your websites that you like to help visitors recognise your site. It also goes into bookmarks.

Google for favicon for the gory details.

Thats what i dont get. I didnt have to do any of that before. But thanks for the info

Because each vhost is like a new website. The settings for the default website don’t carry over.

i dont think we are on the same page.

What i am trying to say is that before i reinstalled system it would do this.

Now after reinstall it wont…

I even went to my first post where you helped me with vhosts and made them the exact same way. I have done everything the same way. But yet, it just shows Index of / rather than the error message i got before reinstall

per a google search

<Directory />
Order Deny,Allow
Deny from all
</Directory>

having that in httpd.conf will block access if there is no index.html. I check and it is there, so like u said that would explain why it is working on my defualt… So i place that in another vhost.conf that i am having troubles with, restarted server, cleared cache and same results… i shoulda never reinstalled

You probably had something in a vhost.conf that affected the global configuration. If it’s outside of a <VirtualHost> scope, then it has global effect, even though you put it in a vhost configuration file.

thanks again ken. I got it figured out and tried to delete message before you read, but looks like you allready replied.

I just had to add

<Directory /home/geoffmcc/public_html>
Order Deny,Allow
Deny from all
</Directory>

whereas before i had

<Directory />
Order Deny,Allow
Deny from all
</Directory>

I wish i knew what i did differently to not make it work by default, but oh well we got it working

<Directory /> Deny from all </Directory> is a fallback restrictive permission that applies to the whole filesystem, just in case.