Reputation: 5069
I am new to Nginx but I managed to install Drupal on windows 8 machine. I just noticed that this URL(http://localhost:8080/drupal/) spits out error message 403 Forbidden. If I mutate that URL a bit by including the index(http://localhost:8080/drupal/index.php) file then it works as expected. My question is this: How could I configure Nginx so that I wont get error message when I go to http://localhost:8080/drupal/?
Upvotes: 1
Views: 63
Reputation: 49742
Depending on your configuration, an index
directive will encourage nginx
to look for specific files when encountering a directory:
index index.php;
For a more specific rule, to single out that one path and map it to the controller, you could use an exact match location
directive:
location = /drupal/ { rewrite ^ /drupal/index.php last; }
Upvotes: 1