3

I try to run my local applications on MAMP PRO. Since now i run MAMP and everything works fine. Now i've changed to MAMP PRO because of the possibilities to generate more hosts and send email from local applications.

Now i have the problem that i can't access files in a directory.

I have checked indexes under Hosts->Extended which should solve this problem.
But it doesn't. I've found many articles but not anyone that solves my problem. I'm also not a specialist on server, but i think there must be a easy solution even in MAMP it works.

I've read something over Web-sharing but this was not clear described enough.

  • MACOSX: 10.11.2
  • MAMP PRO: 3.5

One failure in the log was:

"Permission denied: file permissions deny server access: /folder/file.js"

But where i can change it generally.

Thanks for your Help. I'm very confused.

codeFragment

codeFragment
  • 103
  • 1
  • 1
  • 12

6 Answers6

12

This worked for me.

  1. Create an index file in the directory, by default Apache is looking for such a file
  2. If you want to access the directory (the list of your files or folders in the directory), just go in Mamp Pro to Hosts >> Advanced and check Indexes.

So simple, no need to go configure any file.

Regular Jo
  • 5,190
  • 3
  • 25
  • 47
Omonaiye Ola
  • 121
  • 1
  • 3
5

In MAMP PRO you can check the option INDEXES in Apache tab.

MAMP PRO 403 ERROR

After restart server will work.

Leffa
  • 369
  • 4
  • 7
3

Sounds like a permission problem. Set the parent folder to "read only" for all and assign it to all folders/files below.

Greetings,

Peter

1

I had this happen to me after a cloud restore. I traced the problem to the fact that the site folder hadn't been fully restored and was mostly empty.

The solution was to repeat "Save to Cloud" from the remote computer and then repeat "Load from Cloud" on the computer I was currently using.

lflier
  • 104
  • 5
0

This case is occur when you run Mamp with the Server Nginx and nginx server needed configuration of each working folder/directory. for the nginx configuration you can go in nginx.conf file on path

C:\MAMP\conf\nginx\nginx.conf

and write this script.

http {
    .....
    server {


    location ~* /test(.*)$ {
    root             C:/MAMP/htdocs/test;
        index            index.php;

        location ~ \.php$ {
            try_files        $uri =404;
            fastcgi_pass     127.0.0.1:9100;
            fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include          fastcgi_params;
        }
    }

  }
}

note: in this script test is my working directory. you can replace this name.

manish1706
  • 1,571
  • 24
  • 22
0

Whenever you are setting up a new server on a Mac, whether it be MAMP, MAMP PRO or just straightforward Nginx/Apache, always set the right permissions on the root folder. Permissions are used for security reasons, not a bad thing in any way although it adds layers to get things done good or bad. Nginx/Apache usually uses _www to read and write on your folder. So you must grant _www access access.

To do this for example on a folder located at /MacHD/Sites...

  1. open up a console
  2. sudo chown -R _www Sites
    sudo chmod -R g+w Sites```
    
  3. restart your server

References: - https://ss64.com/osx/chmod.html - https://ss64.com/osx/chown.html