0

So, I installed WAMP on Windows to run Apache and PHP and I need to create virtualhosts that go to the network share \\10.0.0.177\FMS Studios\Websites. When I go to the domain I get a 403 error. This is what I have in my httpd-vhosts.conf file:

<VirtualHost *:80>
    ServerName tree.fmsds.xyz
    DocumentRoot "\\10.0.0.177\FMS Studios\Websites"
    <Directory  "\\10.0.0.177\FMS Studios\Websites">
        AllowOverride All
        Require all granted
        Order deny,allow
    </Directory>
</VirtualHost>

It does not even register as a virtualhost in WAMP's server manager..

WAMP does not see my virtualhost.

403 Error

2
  • Remove Order deny,allow thats Apache 2.2 syntax and does not mix well with Require all granted which is Apache 2.4 syntax
    – RiggsFolly
    Commented Apr 25, 2017 at 10:32
  • Still a 403 error. Commented Apr 25, 2017 at 12:42

1 Answer 1

0

First of all its easier to use forward slashes OR you have to escape all the slashes if you use backslashes

Second you should not mix Apache 2.2 and 2.4 syntax so if you are using an Apache 2.4.x remove the old syntax

<VirtualHost *:80>
    ServerName tree.fmsds.xyz
    DocumentRoot "//10.0.0.177/FMS Studios/Websites"
    <Directory  "//10.0.0.177/FMS Studios/Websites">
        AllowOverride All
        Require all granted
        # remove this as its Apache 2.2 syntax
        #Order deny,allow
    </Directory>
</VirtualHost>

Alternatively using backslashes would look like this

<VirtualHost *:80>
    ServerName tree.fmsds.xyz
    DocumentRoot "\\\\10.0.0.177\\FMS Studios\\Websites"
    <Directory  "\\\\10.0.0.177\\FMS Studios\\Websites">
        AllowOverride All
        Require all granted
        # remove this as its Apache 2.2 syntax
        #Order deny,allow
    </Directory>
</VirtualHost>

Now as its Apache that will require access to the network share you need to be sure that the account that Apache starts under has permissions to access that network share, and that the share is available when the machine is booted and does not need any human intervension.

1
  • Hey, thanks for the answer. However, with the last part regarding network share permissions, do you know how this would be set within Wamp Server?
    – Lee
    Commented Nov 26, 2018 at 17:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.