Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nginx -s reload
- https://drupal.stackexchange.com/questions/228039/nginx-clean-urls-dont-work
- https://www.nginx.com/resources/admin-guide/processes-and-runtime-control/
- https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/
- nano -c /etc/nginx/hosts.d/default.conf
- server {
- listen 80 default_server;
- listen 81 default_server http2 proxy_protocol; ## Needed when behind HAProxy with SSL termination + HTTP/2 support
- listen 443 default_server ssl http2;
- ssl_certificate /etc/nginx/ssl/dummy.crt;
- ssl_certificate_key /etc/nginx/ssl/dummy.key;
- root /data/www/default;
- index index.php index.html;
- location / {
- try_files $uri /index.php?$query_string;
- }
- location @rewrite {
- rewrite ^/(.*)$ /index.php?q=$1;
- }
- # Fighting with Styles? This little gem is amazing.
- location ~ ^/sites/.*/files/styles/ {
- try_files $uri @rewrite;
- }
- # Handle private files through Drupal. Private file's path can come
- # with a language prefix.
- location ~ ^(/[a-z\-]+)?/system/files/ {
- try_files $uri /index.php?$query_string;
- }
- location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
- expires max;
- log_not_found off;
- }
- include /etc/nginx/conf.d/default-*.conf;
- include /data/conf/nginx/conf.d/default-*.conf;
- # PHP backend is not in the default-*.conf file set,
- # as some vhost might not want to include it.
- include /etc/nginx/conf.d/php-location.conf;
- # Import configuration files for status pages for Nginx and PHP-FPM
- include /etc/nginx/conf.d/stub-status.conf;
- include /etc/nginx/conf.d/fpm-status.conf;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement