Jump to content
The Uniform Server Community
Len Jacobson

Error: "You Don't Have Permission to access ..."

Recommended Posts

I have not used Uniform Server in a while. I am presently using PHP Version 5.6.19.

 

I have defined a "<Virtual Host>" with the name, "laptop-test-server". It appears to be properly recognized.

 

If I then open a PHP file on the test server with the URL "laptop-test-server/include/somePHPfile.php", I get the following error message:

 

 

Forbidden

You don't have permission to access /include/somePHPfile.php

 

 

But if I open that same PHP file on the test server with the URL "localhost/include/somePHPfile.php", it works fine.

 

Similarly, if I open it with the URL "127.0.0.1/include/somePHPfile.php", it also works fine.

 

Can someone point me in the direction to fix this problem?

 

Thanks much.

 

Len Jacobson

Share this post


Link to post
Share on other sites

My son came up with the solution.

 

In the 'hosts' file, I needed to have on one line the following:

 

127.0.0.1 localhost laptop-test-server

 

Previously, I had them on separate lines. To be honest, I don't know why it worked when I put them all on one line, but the bottom line is that that's how I got it to work.

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

×
×
  • Create New...