admin

NextJs and WordPress under same Domain with NGINX

To access a path like /var/www/blog/ with a URI like /discover/, you will need to use alias rather than root. server { server_name xyz.com www.xyz.com; #root /var/www/html/folder_name; #index index.html index.htm index.nginx-debian.html; location /_next/static/ { alias /var/www/project_folder/.next/static/; # !!! – change to your app name expires 365d; access_log off; } location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection […]

NextJs and WordPress under same Domain with NGINX Read More »