You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

57 lines
1.6 KiB

upstream php73 {
server php73:9000;
}
upstream php74 {
server php74:9000;
}
map $http_host $root {
loc.octobercms /usr/share/nginx/html/someproject;
loc.wordpress /usr/share/nginx/html/someprojectwp;
}
server {
server_name loc.octobercms;
listen 80;
root $root;
#include global/auth.conf;
#@see https://vcs.wpstudio.ru/wpstudio/nginx-examples
include includes.d/octobercms.conf;
include includes.d/staticfiles.conf;
location ~ ^/index.php {
fastcgi_pass php74;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SERVER_NAME $host;
}
}
server {
server_name loc.wordpress;
listen 80;
root $root;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SERVER_NAME $host;
fastcgi_pass php73;
fastcgi_index index.php;
}
}