Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save t-min/9904e8c5c4d5ffa0f977 to your computer and use it in GitHub Desktop.
Save t-min/9904e8c5c4d5ffa0f977 to your computer and use it in GitHub Desktop.
upstream unicorn {
server unix:/tmp/unicorn.redmine.sock fail_timeout=0;
}
server {
listen 80;
server_name localhost;
# $document_root にパスをセット
root /var/www;
location / {
root /var/www;
index index.php index.html index.htm;
}
error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
#----------------------------------------
#phpmyadmin
#----------------------------------------
location =/phpmyadmin/ {
rewrite ^ /phpmyadmin/index.php;
}
location /phpmyadmin {
if ( !-e $request_filename ) {
rewrite ^ /phpmyadmin/index.php last;
}
}
#----------------------------------------
# basercms
#----------------------------------------
location =/basercms/ {
rewrite ^ /basercms/index.php;
}
location /basercms {
if ( !-e $request_filename ) {
rewrite ^ /basercms/index.php last;
}
}
location /basercms/theme/ {
alias /var/www/basercms/app/webroot/theme/;
}
#----------------------------------------
# concrete57
#----------------------------------------
location =/concrete57/ {
rewrite ^ /concrete57/index.php;
}
location /concrete57 {
if ( !-e $request_filename ) {
rewrite ^ /concrete57/index.php last;
}
}
#---------------------------------------
# wordpress
#----------------------------------------
location /wordpress {
alias /var/www/wordpress;
index index.php index.html index.htm;
}
#---------------------------------------
# redmine
#---------------------------------------
location /redmine {
proxy_pass http://127.0.0.1:8081;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
root html;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment