Created
October 4, 2011 15:34
-
-
Save tyraeltong/1261953 to your computer and use it in GitHub Desktop.
setup wordpress on linode vps part 2
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; #or change this to your public IP address eg 1.1.1.1:80 | |
| server_name wordpress; #change this to the domain name, for example www.myblog.com | |
| access_log /var/log/wordpress.access_log; | |
| error_log /var/log/wordpress.error_log; | |
| location / { | |
| root /home/your-user-name/Sites/wordpress; | |
| index index.php index.html index.htm; | |
| # this serves static files that exist without running other rewrite tests | |
| if (-f $request_filename) { | |
| expires 30d; | |
| break; | |
| } | |
| # this sends all non-existing file or directory requests to index.php | |
| if (!-e $request_filename) { | |
| rewrite ^(.+)$ /index.php?q=$1 last; | |
| } | |
| } | |
| location ~ \.php$ { | |
| fastcgi_pass 127.0.0.1:9000; | |
| fastcgi_index index.php; | |
| fastcgi_param SCRIPT_FILENAME /home/your-user-name/Sites/wordpress$fastcgi_script_name; | |
| include fastcgi_params; | |
| } | |
| } |
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
| sudo vim /etc/nginx/sites-available/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
| sudo ln -s /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/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
| sudo service nginx restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment