HowToRedirectPublicHtmlToWebFolder (diff)

You must first sign up to be able to contribute.

Changes from Version 1 of HowToRedirectPublicHtmlToWebFolder

smeves (IP:
05/10/06 17:49:49 (11 years ago)



  • HowToRedirectPublicHtmlToWebFolder

    v0 v1  
     1'''How To Install Your Symfony App On A Shared Host To Your Root Domain With No vhost.conf Access''' 
     3If you upload your new symfony site to a shared host, and put all of symfony's files into your ~/public_html/ directory, the symfony application is served up with a "/web" at the end. There are a few ways to serve your site up at the root of the domain without having all of your symfony files stored in public_html. Here is one way you can to get around this issue without reinstalling symfony and without access to your vhost.conf or httpd.conf file. 
     51. Copy all the symfony files from ~/public_html over to a new ~/symfony directory: 
     7cp ~/public_html/* ~/symfony 
     92. Move the ~/public_html directory to a backup: 
     11cp ~/public_html ~/public_html.bkp 
     133. Create a new symlink that points ~/public_html to symfony's web directory 
     15ln -s ~/symfony/web/ ~/public_html 
     174. Now, for some reason the .htaccess file from the old public_html folder didn't get copied. So, make sure copied it over to ~/symfony/web/: 
     19cp ~/public_html.bkp/.htaccess ~/public_html 
     20# note the new public_html folder actually points to ~/symfony/web 
     225. Finally edit the .htaccess file in the ~/symfony/web folder so that all requests are directed to just "index.php" file rather than "web/index.php" like it used to be: 
     24RewriteRule ^(.*)$ /index.php [QSA,L] 
     25#RewriteRule ^(.*)$ /web/index.php [QSA,L] 
     276. One last thing... Make sure to change permissions on the cache and log folders: 
     29chmod 777 -R ~/symfony/log ~/symfony/cache