160 lines
3.1 KiB
Nginx Configuration File
160 lines
3.1 KiB
Nginx Configuration File
|
|
|
||
|
|
load_module modules/ngx_http_apache_rewrite_module.so;
|
||
|
|
worker_processes 1;
|
||
|
|
|
||
|
|
error_log logs/error.log debug;
|
||
|
|
|
||
|
|
events {
|
||
|
|
worker_connections 1024;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
http {
|
||
|
|
include mime.types;
|
||
|
|
default_type application/octet-stream;
|
||
|
|
|
||
|
|
sendfile on;
|
||
|
|
|
||
|
|
keepalive_timeout 65;
|
||
|
|
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 8081;
|
||
|
|
server_name localhost;
|
||
|
|
|
||
|
|
|
||
|
|
location / {
|
||
|
|
root html;
|
||
|
|
index index.html index.htm;
|
||
|
|
}
|
||
|
|
|
||
|
|
error_page 500 502 503 504 /50x.html;
|
||
|
|
location = /50x.html {
|
||
|
|
root html;
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 8081;
|
||
|
|
server_name example1.com;
|
||
|
|
|
||
|
|
root /sites/site1;
|
||
|
|
|
||
|
|
HtaccessEnable on;
|
||
|
|
|
||
|
|
RewriteEngine On;
|
||
|
|
|
||
|
|
location / {
|
||
|
|
RewriteEngine On;
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 8081;
|
||
|
|
server_name example2.com;
|
||
|
|
|
||
|
|
root /sites/site2;
|
||
|
|
|
||
|
|
HtaccessEnable on;
|
||
|
|
|
||
|
|
RewriteEngine On;
|
||
|
|
index index.php;
|
||
|
|
|
||
|
|
location / {
|
||
|
|
RewriteEngine On;
|
||
|
|
autoindex on;
|
||
|
|
}
|
||
|
|
|
||
|
|
location ~* \.php$ {
|
||
|
|
RewriteEngine On;
|
||
|
|
include fastcgi_params;
|
||
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||
|
|
fastcgi_pass unix:/run/php-fpm/www.sock;
|
||
|
|
fastcgi_index index.php;
|
||
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 8081;
|
||
|
|
server_name example3.com;
|
||
|
|
|
||
|
|
root /sites/site3;
|
||
|
|
|
||
|
|
HtaccessEnable on;
|
||
|
|
|
||
|
|
RewriteEngine On;
|
||
|
|
index index.php;
|
||
|
|
|
||
|
|
location / {
|
||
|
|
RewriteEngine On;
|
||
|
|
autoindex on;
|
||
|
|
}
|
||
|
|
|
||
|
|
location ~* \.php$ {
|
||
|
|
RewriteEngine On;
|
||
|
|
include fastcgi_params;
|
||
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||
|
|
fastcgi_pass unix:/run/php-fpm/www.sock; # подключаем сокет php-fpm
|
||
|
|
fastcgi_index index.php;
|
||
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 8081;
|
||
|
|
server_name example4.com;
|
||
|
|
|
||
|
|
root /sites/site4;
|
||
|
|
|
||
|
|
HtaccessEnable on;
|
||
|
|
|
||
|
|
RewriteEngine On;
|
||
|
|
index index.php;
|
||
|
|
|
||
|
|
location / {
|
||
|
|
RewriteEngine On;
|
||
|
|
autoindex on;
|
||
|
|
}
|
||
|
|
|
||
|
|
location ~* \.php$ {
|
||
|
|
RewriteEngine On;
|
||
|
|
include fastcgi_params;
|
||
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||
|
|
fastcgi_pass unix:/run/php-fpm/www.sock; # подключаем сокет php-fpm
|
||
|
|
fastcgi_index index.php;
|
||
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 8081;
|
||
|
|
server_name example5.com;
|
||
|
|
|
||
|
|
root /sites/site5;
|
||
|
|
|
||
|
|
HtaccessEnable on;
|
||
|
|
|
||
|
|
RewriteEngine On;
|
||
|
|
index index.php;
|
||
|
|
|
||
|
|
location / {
|
||
|
|
RewriteEngine On;
|
||
|
|
autoindex on;
|
||
|
|
}
|
||
|
|
|
||
|
|
location ~* \.php$ {
|
||
|
|
RewriteEngine On;
|
||
|
|
include fastcgi_params;
|
||
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||
|
|
fastcgi_pass unix:/run/php-fpm/www.sock; # подключаем сокет php-fpm
|
||
|
|
fastcgi_index index.php;
|
||
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|