如何修改 Homestead 的 nginx 配置文件

请教一下应该如何修改homestead的nginx配置文件?

在本地搭建Flarum论坛(https://github.com/justjavac/Flarum.git) ,需要url重写

我的操作

\\登陆ssh
vagrant ssh
\\切换到root用户修改.conf配置文件
root@homestead:~# vim /etc/nginx/sites-available/flarum.test

flarum.test配置文件

server {
    listen 80;
    listen 443 ssl http2;
    server_name .flarum.test;
    root "/home/vagrant/Code/flarum";
   index index.html index.htm index.php;
    charset utf-8;
    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }
     location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }
    access_log off;
    error_log  /var/log/nginx/flarum.test-error.log error;
    sendfile off;
    client_max_body_size 100m;
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
    }
    location ~ /\.ht {
        deny all;
    }
    location / {
    try_files $uri $uri/ /index.php?$query_string;
    }
    location /api {
        try_files $uri $uri/ /api.php?$query_string;
    }
    location /admin {
        try_files $uri $uri/ /admin.php?$query_string;
    }
    location /flarum {
        deny all;
        return 404;
    }
    ssl_certificate     /etc/nginx/ssl/flarum.test.crt;
    ssl_certificate_key /etc/nginx/ssl/flarum.test.key;
}

修改后所有虚拟站都无法访问网页
我url重写那几段代码删除了又可以访问网站了,求指教

《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!