user253530
user253530

Reputation: 2591

install zend framework without apache virtual hosts

I have my website in /var/www/invent. I have zend-framework in /var/www/invent/library.

Basically what i want is when i access http://localhost/invent to work as if i had a virtual host "invent" defined in apache conf file (like accessing http://invent). How can I achieve this? I have developed my project under windows, having virtual hosts set up but I don't want to continue working like this because i cannot deploy my app on public webhosting services that do not allow me to create virtual hosts. Not to mention that if I deploy an app on a LAN, i need to configure the client's hosts file as well... Please help, this is the most annoying thing with zend (haven't tried other frameworks so far though).

Upvotes: 3

Views: 2425

Answers (2)

Conex
Conex

Reputation: 822

remove vhost property and go directly to http://localhost/yourproject/public folder. You will need to stay with htaccess mod_rewrite , don't delete mod_rewrite properties in htaccess

Upvotes: 1

Phil
Phil

Reputation: 164924

Your application document root is wherever you place your index.php file, the locations of the Zend Framework library and your application code are irrelevant.

Provided you've used the BaseUrl helper in your views for static assets (JavaScript, CSS, images) and the Url helper for action links, your application should be very portable in regards to relative path from the web server document root.

Let me know if I'm way off track here. Your question could do with some more details.

Upvotes: 4

Related Questions