我有一个使用Laravel + Nuxt开发的网站。我正在使用Nginx来运行这个网站。在
+
nuxt generate
时,我被重定向到404,但在实际的网站上,我得到了无限的加载
:https://flowerqueen.ro/aiusdhiusadfisadiufh。
我玩了很多配置文件,并检查了堆栈上的其他答案,没有任何帮助:(
nuxt start
这是我的nginx配置。
map $sent_http_content_type $expires {
default on;
text/html epoch;
text/css max;
application/javascript max;
~image/ max;
server {
# redirect all HTTP to HTTPS
listen 80;
expires $expires;
index index.php index.html;
server_name flowerqueen.ro www.flowerqueen.ro;
return 301 https://flowerqueen.ro$request_uri;
server {
listen 443 ssl;
server_name flowerqueen.ro www.flowerqueen.ro;
#ssl on;
ssl_certificate /etc/ssl/certificate.crt;
ssl_certificate_key /etc/ssl/private.key;
index index.php index.html;
error_page 404 /404.html;
# expires $expires;
location / {
proxy_pass http://localhost:4000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_cache cache;
proxy_cache_key $host$uri$is_args$args;
proxy_cache_valid 200 301 302 12h;
# try_files $uri $uri/ /404.html;
# add_header X-Proxy-Cache $upstream_cache_status;
location ^~ /images {
proxy_cache cache;
proxy_cache_valid 200 301 302 12h;
Nuxt。
ssr: true,
target: 'static',
server: {
port: 4000,
host: 'localhost',
终于解决了这个问题,谷歌现在会很高兴。 问题出在这里。