Created
May 9, 2022 22:15
-
-
Save PythonCoderAS/189b1e686cb2977b5f0915a0f08c671b to your computer and use it in GitHub Desktop.
Configuration for wordpress site located at /var/www/wordpress
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 0.0.0.0:443 http2; | |
| listen [::]:443 http2; | |
| server_name <url>; # Fixme! | |
| ssl on; | |
| ssl_certificate /etc/nginx/certificate.pem; | |
| ssl_certificate_key /etc/nginx/certificate.key; | |
| root /var/www/wordpress; | |
| index index.html index.php; | |
| location = /favicon.ico { | |
| log_not_found off; access_log off; | |
| } | |
| location = /robots.txt { | |
| log_not_found off; access_log off; allow all; | |
| } | |
| location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ { | |
| expires max; | |
| log_not_found off; | |
| } | |
| location / { | |
| try_files $uri $uri/ /index.php$is_args$args; | |
| } | |
| location ~ \.php$ { | |
| try_files $uri =404; | |
| fastcgi_pass unix:/var/run/php/php-fpm.sock; | |
| fastcgi_index index.php; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| include fastcgi_params; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment