| 12345678910111213141516171819202122232425262728293031 |
- # adapted from https://gist.github.com/md5/d9206eacb5a0ff5d6be0#file-wordpress-fpm-conf
- server {
- listen 80;
- root /var/www/html;
- client_max_body_size 0;
- index index.php;
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- rewrite /wp-admin$ $scheme://$host$uri/ permanent;
- location ~ [^/]\.php(/|$) {
- fastcgi_split_path_info ^(.+?\.php)(/.*)$;
- if (!-f $document_root$fastcgi_script_name) {
- return 404;
- }
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME /var/www/html/$fastcgi_script_name;
- #fastcgi_param PATH_INFO $fastcgi_path_info;
- #fastcgi_param PATH_TRANSLATED /var/www/html/$fastcgi_path_info;
- fastcgi_pass fpm:9000;
- fastcgi_index index.php;
- }
- }
|