Laravel主机名未更新路由

时间:2019-04-26 21:50:53

标签: laravel nginx apache2 ubuntu-16.04 reverse-proxy

当我进入我的公共DNS并尝试加载Auth路由时,它会将我发送到http://localhost:8080/ExoscapeWebsite/public/login。在我的.env文件中,我已将APP_URL更改为我的公共DNS:

APP_URL=http://exoscape.co.uk

由于无法使用proxy_pass,我正在使用NGINX通过try_files加载Laravel,所以我坚持使用Apache2。我的NGINX配置看起来像这样:

server {

    server_name exoscape.co.uk;

    location / {
        proxy_pass http://localhost:8080/ExoscapeWebsite/public/;
    }

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/exoscape.co.uk/fullchain.pem; # manag$
    ssl_certificate_key /etc/letsencrypt/live/exoscape.co.uk/privkey.pem; # man$
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

关于如何在Laravel中更改主机名,以使其在正确的域中继续存在的任何想法?

0 个答案:

没有答案