This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Question regarding installation.

Discuss installing Symfony 2 here

Question regarding installation.

by RecoilUK » Wed Jan 08, 2014 12:24 pm

Hi guys

I have a question regarding the decisions made when deciding on how the framework should be installed.

At the moment, it seems as if, you install everything then change the web server document root.

Surely its easier to install symfony to any directory and copy over one file to the web root, then alter that file according to where you installed symfony.

I would like to know the thinking behind this.

Thanks in advance.
RecoilUK
Junior Member
 
Posts: 1
Joined: Wed Jan 08, 2014 12:19 pm

Re: Question regarding installation.

by smugford » Tue Jan 14, 2014 10:51 am

it is actually a virtual hosts question you are asking.

http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html

there is a default directory that apache uses and a "Directory" option that you use in your virtual hosts configuration

Code: Select all
<VirtualHost *:80>
    ServerName domain.tld
    ServerAlias www.domain.tld

    DocumentRoot /var/www/project/web
    <Directory /var/www/project/web>
        # enable the .htaccess rewrites
        AllowOverride All
        Order allow,deny
        Allow from All
    </Directory>

    ErrorLog /var/log/apache2/project_error.log
    CustomLog /var/log/apache2/project_access.log combined
</VirtualHost>

<VirtualHost *:80>
    ServerName otherdomain.tld
    ServerAlias www.otherdomain.tld

    DocumentRoot /var/www/otherproject/web
    <Directory /var/www/otherproject/web>
        # enable the .htaccess rewrites
        AllowOverride All
        Order allow,deny
        Allow from All
    </Directory>

    ErrorLog /var/log/apache2/otherproject_error.log
    CustomLog /var/log/apache2/otherproject_access.log combined
</VirtualHost>


Read up on Virtual Hosts on the Apache site assuming you are not using nginx which is even easier than apache.
User avatar
smugford
Faithful Member
 
Posts: 245
Joined: Sun Nov 29, 2009 8:32 pm