Zend Framework on shared hosting

后端 未结 12 1462
孤独总比滥情好
孤独总比滥情好 2020-12-04 17:01

I\'m new to Zend Framework. I would like to know how to implement zend framework on a shared hosting. Because of the zend framework folder structure all view files are put i

12条回答
  •  孤城傲影
    2020-12-04 17:47

    Setting up the virtual host is usually done within httpd.conf or extra/httpd-vhosts.conf. If you are using httpd-vhosts.conf, ensure that this file is included by your main httpd.conf file. Some Linux distributions (ex: Ubuntu) package Apache so that configuration files are stored in /etc/apache2 and create one file per virtual host inside folder /etc/apache2/sites-enabled. In this case, you would place the virtual host block below into the file /etc/apache2/sites-enabled/zf2-tutorial.

    Ensure that NameVirtualHost is defined and set to “*:80” or similar, and then define a virtual host along these lines:

    Setting up the virtual host is usually done within httpd.conf or extra/httpd-vhosts.conf. If you are using httpd-vhosts.conf, ensure that this file is included by your main httpd.conf file. Some Linux distributions (ex: Ubuntu) package Apache so that configuration files are stored in /etc/apache2 and create one file per virtual host inside folder /etc/apache2/sites-enabled. In this case, you would place the virtual host block below into the file /etc/apache2/sites-enabled/zf2-tutorial.
    
    Ensure that NameVirtualHost is defined and set to “*:80” or similar, and then define a virtual host along these lines:
    
     
         ServerName zf2-tutorial.localhost
         DocumentRoot /path/to/zf2-tutorial/public
         SetEnv APPLICATION_ENV "development"
         
             DirectoryIndex index.php
             AllowOverride All
             Order allow,deny
             Allow from all
         
     
    
    Make sure that you update your /etc/hosts or c:\windows\system32\drivers\etc\hosts file so that zf2-tutorial.localhost is mapped to 127.0.0.1.

    Make sure that you update your /etc/hosts or c:\windows\system32\drivers\etc\hosts file so that zf2-tutorial.localhost is mapped to 127.0.0.1.

提交回复
热议问题