Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.