Last active
March 17, 2023 10:23
-
-
Save rkjha/9521019 to your computer and use it in GitHub Desktop.
a sample wordpress config for nginx
This file contains 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; | |
root /home/username/example.com; | |
index index.php index.html; | |
server_name example.com; | |
location / { | |
try_files $uri $uri/ /index.php?q=$uri&$args; | |
} | |
location ~ \.php$ { | |
# use fastcgi_pass 127.0.0.1:9000; | |
# Or using unix socket : | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
} | |
} | |
server { | |
listen 80; | |
server_name www.example.com; | |
return 301 $scheme://example.com$request_uri; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This fixed my issue. Thanks .