Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It works with built-in server but getting 404 errors on apache virtual host #1069

Closed
joaopmmartins opened this issue Jan 21, 2020 · 2 comments

Comments

@joaopmmartins
Copy link

joaopmmartins commented Jan 21, 2020

On the Symphony's built-in server, the demo works perfectly well but when I try with Apache virtual host, I can only view the homepage. For every other page, I am getting a 404 error.

<VirtualHost *:80>
	ServerAdmin webmaster@localhost
	ServerName my-local-site
	ServerAlias my-local-site
   	DocumentRoot /home/websites/my-local-site/public
	<Directory "/home/websites/my-local-site/public">
             Options Indexes FollowSymLinks MultiViews
             AllowOverride All
            Require all granted
        </Directory>
	CustomLog "|/usr/bin/rotatelogs -l /var/log/apache2/my-local-site-access.%Y-%m-%d 86400" common
	ErrorLog "|/usr/bin/rotatelogs /var/log/apache2/my-local-site-error.%Y-%m-%d 5M"
</VirtualHost>

Can you please point me in the right direction? Many thanks.

@joaopmmartins joaopmmartins changed the title It works with local server but getting 404 errors on apache virtual host It works with built-in server but getting 404 errors on apache virtual host Jan 21, 2020
@bocharsky-bw
Copy link
Contributor

Try to install symfony/apache-pack package: https://github.com/symfony/apache-pack - it containes necessary .htaccess config for public/ dir

javiereguiluz added a commit that referenced this issue Jan 22, 2020
This PR was merged into the master branch.

Discussion
----------

Require symfony/apache-pack package

What about to add `symfony/apache-pack` to this project? We have had a few related issues about missing it: #1069, #1005, #711 . Basically, it's a really small package that just adds `.htaccess` file into public/ dir and that's it. It would help Apache users and does not do any harm to others I think, so why not have it out of the box?

Commits
-------

9a2dad5 Require symfony/apache-pack package
@javiereguiluz
Copy link
Member

Closing as fixed because in the next stable version of this project we'll include the Apache package to make it work out-of-the-box. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants