0

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 public inaccessible and I would like to run my project after www.mydomain.com/projects/myproject... What should I do to achieve this goal?

Greetings!

Charles
  • 50,943
  • 13
  • 104
  • 142
Bart
  • 2,301
  • 3
  • 29
  • 27
  • possible duplicate of http://stackoverflow.com/questions/3753459/zend-framework-deployment-in-server – Keeper Jan 25 '11 at 14:40

1 Answers1

0

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.

Tjorriemorrie
  • 16,818
  • 20
  • 89
  • 131