Answer the question
In order to leave comments, you need to log in
How to set up virtual hosts in nginx vagrant?
I have a test.dev folder and a config file in Sites-available called test.dev as well. Does not work at test.dev at all, but at ip 192.168.33.10 error 502
server {
# Порт по умолчанию, который принадлежит http
listen 80;
# Ошибки записывать в этот файл
error_log /var/log/nginx/test_errors.log;
charset utf-8;
server_name test.dev;
# Путь к нашему проекту
root /vagrant/www/test.dev;
# Стартовый файл для нашего проекта
index index.php index.html index.htm;
# Все что касается php (файлы *.php) будем отправлять нашему php-fpm
location ~ \.php$ {
fastcgi_pass 127.0.0.1:8999;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /vagrant/www/blog$fastcgi_script_name;
include fastcgi_params;
}
}
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