<VirtualHost 192.168.1.1/8080:80>
ServerAdmin admin@8080
ServerPath /8080/
ServerName 192.168.1.1/8080
DocumentRoot /var/www/8080
DirectoryIndex 7.php
SetHandler "proxy:fcgi://127.0.0.1:8080
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
AddHandler php74-fcgi .php
Action php74-fcgi /cgi-bin/php74.fcgi
ErrorLog /var/log/httpd/8080_2.log
CustomLog /var/log/httpd/8080_2.log combined
</VirtualHost>
<virtualHost 192.168.1.1/8082:80>
ServerAdmin admin@8082
ServerPath /8082/
ServerName 192.168.1.1/8082
DocumentRoot /var/www/8082
DirectoryIndex 8.php
SetHandler "proxy:fcgi://127.0.0.1:8082
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
AddHandler php82-fcgi .php
Action php82-fcgi /cgi-bin/php82.fcgi
ErrorLog /var/log/httpd/8082.log
CustomLog /var/log/httpd/8082.log combined
</VirtualHost>
<VirtualHost addr[:port] [addr[:port]] ...> ... </VirtualHost>
<VirtualHost 192.168.1.1:80>
ServerAdmin admin@8080
ServerName 192.168.1.1
DocumentRoot /var/www
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory "/var/www/8080">
DirectoryIndex 7.php
SetHandler "proxy:fcgi://127.0.0.1:8080
AddHandler php74-fcgi .php
Action php74-fcgi /cgi-bin/php74.fcgi
</Directory>
<Directory>
DirectoryIndex 8.php
SetHandler "proxy:fcgi://127.0.0.1:8082
AddHandler php82-fcgi .php
Action php82-fcgi /cgi-bin/php82.fcgi
</Directory>
ErrorLog /var/log/httpd/8080.log
CustomLog /var/log/httpd/8080.log combined
</VirtualHost>
server {
listen 80;
server_name test.loc;
root /var/www/test.loc;
index index.php index.html index.html;
access_log /var/log/nginx/test.loc.log;
error_log /var/log/nginx/test.loc.error;
gzip on;
gzip_vary on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
charset utf-8;
client_max_body_size 32m;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location ~ /\.ht { deny all; }
}