user618677
user618677

Reputation: 5069

Running Nginx and Drupal

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

Answers (1)

Richard Smith
Richard Smith

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; }

See this and this for more.

Upvotes: 1

Related Questions