Thứ Năm, 30 tháng 5, 2013

Hosts and vituarhost for apache2 in ubuntu

127.0.0.1    localhost
127.0.1.1    trivan-desktop
127.0.0.1        testphp1.com
127.0.0.1        testphp2.com
127.0.0.1        4impactwb.com

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters



AND VITUARHOST :
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName testphp1.com
    DocumentRoot /var/www/testphp1.com
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>




and for zend project :
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName 4impactwb.com
    ServerRoot   /var/www
    DocumentRoot /var/www/mobile-site-dev.4impact.net.au/website/public

    <Directory />
        Options All
        AllowOverride All
    </Directory>
    <Directory /var/www/mobile-site-dev.4impact.net.au/website/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride All
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>




NOTE:
permission for www folder : chmod -R 777 www/

Không có nhận xét nào:

Đăng nhận xét

Học lập trình web căn bản với PHP

Bài 1: Các kiến thức căn bản Part 1:  https://jimmyvan88.blogspot.com/2012/05/can-ban-lap-trinh-web-voi-php-bai-1-cac.html Part 2:  https://...