Jump to content

Virtual host troubleshooting


simpli

Recommended Posts

I have some problems with my virtual hosting.

I have two websites in 2 different folders under my /library/WebServer/documents folder (I'm on a mac).

I therefore have folder budgetobjects and quickstart (2 separate sites).

 

I created my virtual hosts but it's not working.

When I go to either http://localhost/budgetobjects/ or http://localhost/quickstart/ I get the error message: You don't have permission to access /quickstart/ on this server.

 

I have order allow, deny so I don't know why I have this error message.

When I look at my error log, I see that http://localhost/budgetobjects/ resolves to Library/webserver/documents/budgetObjects/public/budgetobjects

and http://localhost/quickstart/ resolves to Library/webserver/documents/budgetObjects/public/quickstart. Thats not what I expected. I expected each to resolve to their proper directory. Can anyone tell me what's wrong. here's an excerpt of my httpd.conf

I've read plenty of doc but can't seem to solve this.

Thanks in advance, JR

 

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
</Directory>

<Directory "/Library/WebServer/Documents">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All

    Options FollowSymLinks
    Order allow,deny
    Allow from all
    Options Indexes MultiViews
    AllowOverride AuthConfig	
</Directory>


<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

<FilesMatch "^\.([Hh][Tt]|[Dd][ss]_[ss])">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>

<Files "rsrc">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>
<DirectoryMatch ".*\.\.namedfork">
    Order allow,deny
    Deny from all
    Satisfy All
</DirectoryMatch>

NameVirtualHost *:80

<VirtualHost *:80>
ServerName http://localhost/budgetobjects/
DocumentRoot /library/webserver/documents/budgetObjects/public

<Directory "/library/WebServer/Documents/budgetobjects/public">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

ErrorLog /var/log/budgetobjects/errors.log
CustomLog /var/log/budgetobjects/access.log common

</VirtualHost>

<VirtualHost *:80>
DocumentRoot /library/webserver/documents/quickstart/quickstart/public

<Directory "/library/WebServer/Documents/quickstart/quickstart/public">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

ServerName http://localhost/quickstart/
ErrorLog /var/log/quickstart/errors.log
CustomLog /var/log/quickstart/access.log common
</VirtualHost>

Link to comment
https://forums.phpfreaks.com/topic/160261-virtual-host-troubleshooting/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.