我在Vagrant中遇到了php版本升级问题。这已经解决了,但我现在的问题是,以前的工作现在没有了,我想应该与本地项目所在的目录有关。
我(像以前一样)在
/var/www/
所有的
*.conf
中的文件
/etc/nginx/sites-available/
和
/etc/nginx/sites-enabled/
都是相同的,并且指向
/变量/www/
.
这个
/etc/hosts
例如,文件保持指向之前的状态
192.168.56.102 awesome.devel
.这起作用了,但已经不起作用了。
如果我击中
192.168.56.102
在浏览器上
祝贺你真是太棒了。
位于中的页面
/var/www/html/
我的问题是
,在何处以及如何配置服务器以从中加载项目
/变量/www/
而不是来自
/var/www/html/
再说一遍,因为所有的项目都是
*.形态
中的文件
sites-available
和
sites-enabled
已配置。
快速提示:MariaDB运行良好,我可以从Sequel Pro访问数据库,我可以通过ssh访问vagrant,php运行良好
PHP 7.1.17-1+ubuntu14.04.1+deb.sury.org+1
这里没有问题。
在我的。conf文件我有以下内容(只需更改项目名称):
server {
listen *:80;
server_name awesome.devel www.awesome.devel;
client_max_body_size 1m;
root /var/www/awesome/public/;
index index.html index.htm index.php;
access_log /var/log/nginx/nxv_awesome.access.log;
error_log /var/log/nginx/nxv_awesome.error.log;
index index.php index.html index.htm;
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
access_log off;
expires max;
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_pass 127.0.0.1:9000;
try_files $uri $uri/ /index.php$is_args$args;
}
}
提前感谢您的帮助