Jump to content
The Uniform Server Community
Sign in to follow this  
Whole9Yards

Permission Denied To Access Root On This Server 403

Recommended Posts

This sould be easy to correct but since I am not handy with the Apache httpd-vhosts.conf commands I would be super happy about some quick help.

 

My original httpd-vhosts.conf file from a previous development environment looks like this.

<VirtualHost *:80>
    DocumentRoot "D:/WEB PROJECTS/WWW"
    ServerName work.webdev
    ServerAlias www.work.webdev

    <Directory "D:/WEB PROJECTS/WWW">
	AllowOverride all
        Options Indexes FollowSymLinks

    	<IfDefine APACHE24>
    		Require local
    		Require ip 192.168.188
	</IfDefine>

	<IfDefine !APACHE24>
		Order Deny,Allow
    		Deny from all
    		Allow from 127.0.0.0/8 localhost ::1 192.168.188
    	</IfDefine>

    </Directory>
</VirtualHost>

When I, instead of using

    	<IfDefine APACHE24>
    		Require local
    		Require ip 192.168.188
	</IfDefine>

	<IfDefine !APACHE24>
		Order Deny,Allow
    		Deny from all
    		Allow from 127.0.0.0/8 localhost ::1 192.168.188
    	</IfDefine>

simply use

	AllowOverride all
        Options Indexes FollowSymLinks
			Require all granted

I can access the root and all my projects fine.

 

However I would like to restrict access to these projects to IP localhost "127.0.0.1" as well as to IPs on the local network starting with "192.168.188....".

 

How would I have to write this for Uniform Server ZeroXI to accept this please?

 

I assume this line is the culprit.

<IfDefine APACHE24>

Any help with this is much appreciated.

 

Thank you.

Share this post


Link to post
Share on other sites

Ok I fixed the permission error by simply deleting the conditional APACHE24 command.

 

Now the httpd-vhosts.conf file looks like this.

<VirtualHost *:80>
    DocumentRoot "D:/WEB PROJECTS/WWW"
    ServerName work.webdev
    ServerAlias www.work.webdev

    <Directory "D:/WEB PROJECTS/WWW">
	AllowOverride all
        Options Indexes FollowSymLinks
			
    	Require local
    	Require ip 192.168.188
		
		Order Deny,Allow
    		Deny from all
    		Allow from 127.0.0.0/8 localhost ::1 192.168.188    	

    </Directory>
</VirtualHost>

However, does this really make sure that only IP 127.0.0.1 as well as all IPs on the local network starting with 192.168.188... are allowed to access root?

 

Are my commands for the httpd-vhosts.conf file correct like this or are these access permission settings wrong?

 

Thank you for confirming this.

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...