admin管理员组文章数量:1316695
GET ... net::ERR_ABORTED 404 (Not Found) in console on http://mycomputername:88/app/
I am running an Apache server on port 88
and a Nuxt.js dev server on port 3000
. I have configured Apache to proxy requests to Nuxt, but I keep getting the following error in the browser console:
GET http://mycomputername:88/app/ net::ERR_ABORTED 404 (Not Found)
Apache Configuration
<VirtualHost *:88>
ServerAdmin postmaster@localhost
ServerName mycomputername:88
# DocumentRoot and directory settings
DocumentRoot "C:/Alati/Apache24/htdocs"
<Directory "C:/Alati/Apache24/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
Alias /C/ "C:/"
<Directory "C:/">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Alias /E/ "E:/"
<Directory "E:/">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/(C|E|app|ws)(/.*)?$
RewriteRule ^(.*)$ /app [L,R=301]
ProxyPass /app http://mycomputername:3000/app
ProxyPassReverse /app http://mycomputername:3000/app
</VirtualHost>
Nuxt.js Configuration
export default defineNuxtConfig({
modules: ['@nuxt/eslint', '@pinia/nuxt'],
ssr: false,
devtools: { enabled: false },
app: {
baseURL: '/app/',
head: {
htmlAttrs: { lang: 'hr' },
title: 'Proba',
},
errorPage: { page: '/error.vue' },
},
css: [
'vuetify/lib/styles/main.sass',
'@mdi/font/css/materialdesignicons.min.css',
],
build: {
transpile: ['vuetify'],
terserOptions: { keepNames: true },
},
devServer: {
host: 'mycomputername',
port: 3000,
cors: { origin: ['http://mycomputername/'] },
},
compatibilityDate: '2025-01-01',
vite: {
esbuild: { keepNames: true },
server: {
allowedHosts: ['mycomputername'],
hmr: { overlay: false, protocol: 'ws', port: 3000, clientPort: 3000 },
},
},
telemetry: false,
server: false,
});
Setup Summary
Both Apache and Nuxt.js are running on the same machine. The Apache server is configured to listen on port 88. The Nuxt.js dev server is running on port 3000. The ProxyPass directive in Apache is configured to proxy requests to http://mycomputername:3000/app. Issue Even though I have set up ProxyPass for /app, I am still getting a 404 Not Found error when trying to access http://mycomputername:88/app/.
What could be causing this issue? How can I correctly configure Apache to proxy requests to Nuxt.js?
本文标签: nuxtjsneterraborted 404 (not found) apachenuxtStack Overflow
版权声明:本文标题:nuxt.js - net::err_aborted 404 (not found) apachenuxt - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742005977a2411960.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论