Last active
December 3, 2021 22:40
-
-
Save achraf-jeday/a28313c309ccfa2ae8b8995c68616330 to your computer and use it in GitHub Desktop.
Nginx configuration for Drupal 9 without ssl (only http)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen [::]:80; | |
server_name dev.passwordlocker.loc; | |
index index.php index.html index.htm; | |
root /var/www/html/web; | |
location ~ /.well-known/acme-challenge { | |
allow all; | |
root /var/www/html; | |
} | |
location / { | |
try_files $uri $uri/ /index.php$is_args$args; | |
} | |
rewrite ^/core/authorize.php/core/authorize.php(.*)$ /core/authorize.php$1; | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass drupal:9000; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
location = /favicon.ico { | |
log_not_found off; access_log off; | |
} | |
location = /robots.txt { | |
log_not_found off; access_log off; allow all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment