Good day. This is a question for those people who know Symfony 2 well. I have been working with php on Codeigniter and Kohana frameworks for years. The need makes you understand Symfony, and then the logic breaks down, how you can run it by downloading and installing the archive, as this is done in the above frameworks, and not by running php bin / console server: run.

    2 answers 2

    The official website has sample configuration files for Apache and Nginx https://symfony.com/doc/2.8/setup/web_server_configuration.html

    For Apache, a virtual host might look like this:

    <VirtualHost *:80> ServerName domain.tld ServerAlias www.domain.tld DocumentRoot /var/www/project/web <Directory /var/www/project/web> AllowOverride None Order Allow,Deny Allow from All <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ app.php [QSA,L] </IfModule> </Directory> # uncomment the following lines if you install assets as symlinks # or run into problems when compiling LESS/Sass/CoffeScript assets # <Directory /var/www/project> # Options FollowSymlinks # </Directory> # optionally disable the RewriteEngine for the asset directories # which will allow apache to simply reply with a 404 when files are # not found instead of passing the request into the full symfony stack <Directory /var/www/project/web/bundles> <IfModule mod_rewrite.c> RewriteEngine Off </IfModule> </Directory> ErrorLog /var/log/apache2/project_error.log CustomLog /var/log/apache2/project_access.log combined </VirtualHost> 

      Thanks for the help, but this is the case. I tried everything that is written on many sites, including the official symfony. I tried all this on the most recent version of Centos 7. It turned out to be mildly damp. But after changing the system to Ubuntu 16.04, everything worked right away.