Symfony 3 VirtualHost Configuration

22-10-2016

Symfony 3 Configuration in httpd.conf After this configuration we can access the site at http://localhost:8090

<VirtualHost *:8090>
    ServerName domain.tld
    ServerAlias www.domain.tld

    DocumentRoot C:/xampp/htdocs/symfony/urunTakipSistemi/web
    <Directory C:/xampp/htdocs/symfony/urunTakipSistemi/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/CoffeeScript 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 C:/xampp/htdocs/symfony/urunTakipSistemi/web/bundles>
        <IfModule mod_rewrite.c>
            RewriteEngine Off
        </IfModule>
    </Directory>
</VirtualHost>

© 2019 All rights reserved. Codesenior.COM