Answer the question
In order to leave comments, you need to log in
What to do, because of the nginx config, openserver does not start?
I'm transferring a file from the hosting, using cfg, but the server does not start, what could be the problem?
Apache_2.4-PHP_8.0-8.1+Nginx_1.21_vhostn.conf
server {
charset utf-8;
client_max_body_size 128M;
sendfile off;
listen 80; ## listen for ipv4
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
server_name admin;
index index.php;
root /domains/admin/admin;
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php$is_args$args;
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
try_files $uri =404;
}
}
# Static files location
location ~* \.(jpg|jpeg|gif|png|ico|css|bmp|swf|js)$ {
access_log off;
expires 30d;
}
location ~ /\.(ht|svn|git) {
deny all;
}
}
server {
charset utf-8;
client_max_body_size 128M;
sendfile off;
listen 80; ## listen for ipv4
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
server_name admin;
index index.php;
root /home/vostok/www/videokot/admin;
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php$is_args$args;
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
try_files $uri =404;
}
}
# Static files location
location ~* \.(jpg|jpeg|gif|png|ico|css|bmp|swf|js)$ {
access_log off;
expires 30d;
}
location ~ /\.(ht|svn|git) {
deny all;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question