英文:
Symfony website with WampServer that displays only the home page
问题
I have a Symfony site that works perfectly locally. Now I try to put it on a server with WampServer. Once I launch the virtual host of Wamp, I arrive on the home page of my site (the login page) but once I manage to connect, I get the page :
Not Found
The requested URL was not found on this server.
Apache/2.4.54 (Win64) PHP/8.2.6 mod_fcgid/2.3.10-dev Server at itp-consult Port 80
I've tried like said here :
https://symfony.com/doc/current/setup/web_server_configuration.html
to add the symfony/apache-pack bundle and I modified the .htaccess file but nothing changed.
英文:
I have a Symfony site that works perfectly locally. Now I try to put it on a server with WampServer. Once I launch the virtual host of Wamp, I arrive on the home page of my site (the login page) but once I manage to connect, I get the page :
Not Found
The requested URL was not found on this server.
Apache/2.4.54 (Win64) PHP/8.2.6 mod_fcgid/2.3.10-dev Server at itp-consult Port 80
I've tried like said here :
https://symfony.com/doc/current/setup/web_server_configuration.html
too add the symfony/apache-pack bundle and i modified the .httpaccess file but nothing changed.
答案1
得分: 1
你不应该修改由symfony/apache-pack创建的文件。
该捆绑包在public/
目录中生成一个文件,您应该从那里提供您的网站。请确保不要从Symfony项目的根目录提供服务。(https://symfony.com/doc/current/deployment.html#symfony-deployment-basics)
另外,我假设这是一个拼写错误,但只是为了确保:文件的名称应该是.htaccess
,而不是.httpaccess
。
希望这有所帮助。
英文:
You should not be modifying the file created by symfony/apache-pack.
The bundle generates a file in the public/
directory which you should be serving your website from. Make sure you're not serving from the root of your Symfony project. (https://symfony.com/doc/current/deployment.html#symfony-deployment-basics)
Also I assume it is a typo but just to make sure : the name of the file should be .htaccess
, not .httpaccess
.
Hope this helps.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论