views:

218

answers:

4

I have learned how to create a simple website with the Zend Framework. Now suppose I want to put it on some web hosting server. In my ZF project, I have a folder named public, which I want to appear as the root of the URL. I want my site to be visible and accessible as

http://www.mysite.com

while being served from a page like /public/index.phtml or similar.

How is this done?

A: 

Hi, If You want domain like www.mysite.com, u must buy somewhere one (for example ovh.org), there is not free *.com domain. After that u could direct domain to your host computer (nice free hosting: 60free.ovh.org). There is PHP of course, so i think you could install Zend there.

Rin
Another very nice FREE hosting http://www.000webhost.com/
Rin
A: 

You have to put the public_html files you're using with Zend_Framework in the root folder of your host. The host server will give you a folder which will be the root for that domain, put in there and you will not have /public/index.phtml in front of your domain name.

LuRsT
Thanks! The suggestion seems good... The next question is then: how many path variables do I need to change?
Giuseppe
A: 

Do you already have a hosting server or are you looking for one?

Usually you can achieve your goal by using the tools provided by your hosting provider, some allow you to change the directory from which http://www.yoursite.com is server, set that to /public and you are done.

It really depends on the provider.

Anti Veeranna
A: 

You'll need to deploy the entire Zend Framework directory structure to the host you end up using. In your Zend Framework directory structure, you have your public directory. This directory will need to be the one that your web server looks at as your document root. The setup for this is probably different based on which host you use. Some will have web interfaces and others will force you to edit an httpd.conf file.

I'm using Rackspace for our site and the default web location is /var/www/html/. We've deployed the entire site here so we have the following directories: /var/www/html/application /var/www/html/library /var/www/html/public /var/www/html/scripts

We then had to change our Apache config to point to /var/www/html/public instead of /var/www/html.

Chris Williams