S
S
sphinks2012-09-19 17:34:28
symfony
sphinks, 2012-09-19 17:34:28

How to transfer symfony 2 project to production server correctly?

Question in the following, created the project locally. I began to move it to hosting, put all the project folders (including web) in public_html, and as a result I get that the site works through www.my-domain.ru/web/app.php/ . And I want www.my-domain.ru . You can also not write app.php, the effect will be similar, while when you follow links within the site, you do not need to enter app.php. Locally I tried to rename web to public_html - it took off. I upload the whole project in a different way, I put all the folders except for the web next to public_html on the hosting, I throw everything that was in the web into public_html. www.my-domain.com/app.php/- it works, I remove app.php - it doesn't work, the index file was not found. I make it smarter in .htaccess and enter the DirectoryIndex app.php line - great, the main page opens at www.my-domain.ru , but all other links do not work, everything works if you enter app.php with your hands in front of them. Actually, as I understand it, symfony, when working correctly, implicitly substitutes app.php, but it does not work in such an arrangement of folders. Question to the experts, how to fix it? Maybe I put the folders on the same level with public_html in vain, but it was necessary to map the web in a different way? The conversation is about shared hosting, but there is an ssh console.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
BoneFletcher, 2012-09-19
@BoneFletcher

The location of the folders at the same level as public_html is correct. The name of the folder web or public_html does not matter. Most likely, mod_rewrite does not work on the hosting, since htaccess in symfony directs any address, for example, www.my-domain.ru/blog to app.php: www.my-domain.ru/app.php/blog .
"DirectoryIndex app.php" is not needed, because The index page is directed to app.php following the same rule.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question