-2

I need to configure my virtualhost , I have a symfony installation in /home/sfproduction/www/prod/public/ I need to change my root in order to point to my folder /public/

I have check symfony doc but I don't understand . How can I proceed ?

My current virtualhost setting is that but It doesn't work(display Bad Gateway):

----(I have put .after < in order to display on the forum)---

<./VirtualHost *:80>

  ServerName sfproduction.alwaysdata.net

  DocumentRoot "/home/sfproduction/www/prod/public/web"

  DirectoryIndex index.php

Alias /  /home/sfproduction/www/prod/public/

  <Directory /sfproduction/www/prod/public>

   AllowOverride All

   Allow from All

  </Directory>

<*/VirtualHost>
Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291
TheJoker
  • 21
  • 9

1 Answers1

0

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

<VirtualHost *:80>
  ServerName sfproduction.alwaysdata.net

  DocumentRoot /home/sfproduction/www/prod/public/web        
  <Directory /home/sfproduction/www/prod/public/web>
      AllowOverride All
      Order allow,deny
      Allow from All
  </Directory>
</VirtualHost>

Updated after the comments:

The original question is solved, infact now your url points to your symfony app.php

Now your php paged are downloaded insted of been seen. This problem can be due to a misconfiguration of Apache;

see those related question to understand how to solve:
PHP files are downloaded by browser instead of processed by local dev server (MAMP)

https://serverfault.com/questions/215455/what-causes-php-pages-to-consistently-download-instead-of-running-normally

Community
  • 1
  • 1
Filo
  • 2,829
  • 1
  • 21
  • 36