Zend framework deployment
Hello I wanted to upload my web project done with zend framework on my ftp server. I have uploaded it to the public_html/projects/myproject directory (I uploaded whole folder structure, directories: application, docs, library, Obsolete, public, scripts, tests, Zend). Now if I type www.mydomain.com/projects/myproject I see all these folders. If I want to run project I have to type www.mydomain.com/projects/myproject/public
I am not really surprised with that because it's exactly what I could expect, but I don't know how to make all folders other than p开发者_StackOverflow社区ublic inaccessible and I would like to run my project after www.mydomain.com/projects/myproject... What should I do to achieve this goal?
Greetings!
You will have to put htaccess files in the root, projects and myproject directories to disallow access. I don't know it by hand but it should be
deny all
Then in your apache config, might be a file named sites-enabled, there you should only need to add the directory config to the default host, e.g.:
<virtualhost foobar:80>
some crap here
some more crap
<Directory /projects/myproject/public>
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</virtualhost>
That should make your site work.
Remember to add the following to your project's htaccess file:
RewriteBase /projects/myproject
Hope that helps.
精彩评论