Answer the question
In order to leave comments, you need to log in
Mina, site deployment on Yii2, did anyone set it up?
Hello! In general, the problem is as follows:
Actually there is a site on Yii2 (Yii 2 Advanced template) running on nginx. To deploy the application from the test server to the product, I used mina. The deployment succeeds, there are no errors, and the required structure is created. The current folder has been created, which refers to the latest release. When accessing the site, it gives an error 500. I used the following nginx configuration:
server {
listen 80;
server_name 185.167.50.23;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
root /home/productive/current/frontend/web;
index index.php;
location /backend {
alias /home/productive/current/backend/web;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ ^/(protected|framework|themes/\w+/views) {
deny all;
}
location ~ /\. {
deny all;
}
location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
try_files $uri =404;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
}
Answer the question
In order to leave comments, you need to log in
1. why do you have comments in the config?
2. do you understand what this config does?
3. turn on the logs and see what you get as a result of the request.
4. fix config or application
5. profit
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question