简体   繁体   中英

WAMP 3.06, is Directory into Virtual Hosts broken?

I am using WAMP 3.06. I have a web site hosted in "c:/wamp64/www/webagenda"

When I try to access the site remotely using " http://cloudappoint.myvnc.com ", I get:

Forbidden

You don't have permission to access /webagenda on this server.
Apache/2.4.23 (Win64) PHP/5.6.25 Server at agenda.myvnc.com Port 8000

My virtual host file is:

# Virtual Hosts

<VirtualHost *:8000>
    ServerName localhost
    DocumentRoot c:/wamp64/www
    <Directory  "c:/wamp64/www/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>


#if I uncomment the next lines the problem is over
#<Directory "c:/wamp64/www/webagenda">
#Options Indexes FollowSymLinks Includes ExecCGI
#DirectoryIndex index.php
#AllowOverride None
#Require all granted
#</Directory>


<VirtualHost *:8000>
    ServerName cloudappoint
    ServerAlias cloudappoint.myvnc.com
    DocumentRoot c:/wamp64/www/webagenda
    ErrorLog "logs/agenda-error.log"
    CustomLog "logs/agenda-access.log" common
    <Directory "c:/wamp64/www/webagenda/">
        Options +Indexes +FollowSymLinks +MultiViews 
        DirectoryIndex index.php
        AllowOverride All
        Require all granted
   </Directory>
</VirtualHost>

As you can see from my comments, if II uncomment the next lines the problem is over:

<Directory "c:/wamp64/www/webagenda">
Options Indexes FollowSymLinks Includes ExecCGI
DirectoryIndex index.php
AllowOverride None
Require all granted
</Directory>

What is wrong here, please?

If moving the <Directory> block out of the <VirtualHost> block causes access to be allowed then it is a fair assumption that there is something wrong with the <VirtualHost> definition.

Can I suggest that you try this change in your definition

<VirtualHost *:8000>

    ServerName cloudappoint.myvnc.com           <--change
    ServerAlias www.cloudappoint.myvnc.com      <--change

    DocumentRoot c:/wamp64/www/webagenda
    ErrorLog "logs/agenda-error.log"
    CustomLog "logs/agenda-access.log" common
    <Directory "c:/wamp64/www/webagenda/">
        Options +Indexes +FollowSymLinks +MultiViews 
        DirectoryIndex index.php
        AllowOverride All
        Require all granted
   </Directory>
</VirtualHost>

EDIT

I assume you are adding the non standard port number to the url when trying to access the site?

http://cloudappoint.myvnc.com:8000

When I add the :8000 I do not get the error I get an offline page saying

The site you have requested is currently unavailable, 
please try back again later.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM