php - How to configure a vhost for zendframework? -


i configure vhost zf, have no idea how it, please if great. thanks

the process of creating virtual host, depends on version of apache, overall remains same.

apache (scroll down apache2)

if using regular apache, such apache on mamp stack or centos, following.

edit httpd.conf file, in apache conf directory, add end of file.
(if using mamp, in applications/mamp/conf/apache otherwise should in /etc/apache/conf)

namevirtualhost *:80 <virtualhost *:80>      servername quickstart.local      documentroot /applications/mamp/htdocs/quickstart/public      setenv application_env "development"      <directory /applications/mamp/htdocs/quickstart/public>           directoryindex index.php           allowoverride           order allow,deny           allow      </directory> </virtualhost> 

after this, restart apache,

sudo /etc/init.d/apache restart 

or restart via xamp stack client if exists.

you need let browser aware of domain name "quickstart.local" in case.

go hosts file.

sudo vim /etc/hosts 

add following line.

127.0.0.1       quickstart.local 

exit

all done.


if using apache2, same thing, instead of editing httpd.conf file. go /etc/apache2.conf

make sure

# include virtual host configurations: include /etc/apache2/sites-enabled/ 

is uncommented.

now go sites-available.

create new file name domain name, in case "quickstart.local"

<virtualhost *:80> servername quickstart.local serveralias quickstart.local documentroot /var/www/quickstart/public #or whatever path is. setenv application_env "development"  <directory /var/www/quickstart/public>       directoryindex index.php       allowoverride       order allow,deny       allow  </directory> </virtualhost> 

save

now go sites-enabled folder.

do following

sudo ln -s /etc/apache2/sites-available/quickhost.local . 

now go edit hosts file discussed above (if made domain name). you should good.

if if not working , may dont have directory enabled .htaccess.

for zend work, need make sure directory set to

"allowoveride all"

<directory <path whatever>>         options indexes followsymlinks multiviews         allowoverride         order allow,deny         allow </directory> 

this allows zend routing system work. set off default sometimes.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -