Hi,
These are tutorials how to create virtual host for Zend Framework
These are tutorials how to create virtual host for Zend Framework
- Ubuntu:
- Apache:
- sudo vim /etc/apache2/sites-available/domain.com
- <VirtualHost *:80>
ServerName my.domain.com
ServerRoot /path/to/server/root/
DocumentRoot /path/to/server/root/my.domain.com/public
RewriteEngine off
<Location />
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(js|ico|gif|jpg|png|css|swf|json|xml)$ /index.php
</Location>
</VirtualHost> - sudo ln -s /etc/apache2/sites-available/domain.com /etc/apache2/sites-enabled/domain.com
- sudo /etc/init.d/apache2 restart:
- Lighttpd:
- sudo vim /etc/lighttpd/conf-enabled/10-simple-vhost.conf:
- $HTTP["host"] == "hostname" {
server.document-root = "/home/web/123do.tracking/public/"
url.rewrite-once = (".*\.(js|ico|gif|jpg|png|css|swf|xml)$" => "$0", "" => "/index.php")
} - --OR--
- $HTTP["host"] == "hostname" {
server.document-root = "/home/web/123do.tracking/public/"
url.rewrite-once = ( "^(/(?!(favicon.ico$|scripts/|styles/|images/)).*)" => "index.php" )
} - sudo /etc/init.d/lighttpd restart
- Centos:
- Apache:
- sudo vi /etc/httpd/conf/httpd.conf
- <VirtualHost *:80>ServerName domain.comServerRoot /var/www/domainDocumentRoot /var/www/domainRewriteEngine off<Location />RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule !\.(js|ico|gif|jpg|png|css|swf|json|xml)$ /index.php</Location></VirtualHost>
- sudo /etc/init.d/httpd restart
Good luck!
No comments:
Post a Comment