>  기사  >  백엔드 개발  >  Apache 사용 팁

Apache 사용 팁

WBOY
WBOY원래의
2016-08-08 09:31:251207검색

1. 다중 사이트 구성:

1. httpd.conf를 열고 가상 디렉터리를 활성화하도록 설정합니다.

<Directory />
    options FollowSymLinks
    AllowOverride all
    Allow from all
    #Require all denied
</Directory>

2. 🎜>

Include conf/extra/httpd-vhosts.conf,

3. 노드 수정

<pre name="code" class="html"><VirtualHost *:80>
        ServerAdmin webmaster@dummy-host.example.com 
        DocumentRoot "/var/www/cloud_whirlpool_china"
        ServerName cloud.whirlpool-china.com
        ServerAlias cloud.whirlpool-china.com
        ErrorLog "logs/cloud.whirlpool-china.com-error_log"
        CustomLog "logs/cloud.whirlpool-china.com-access_log" common
</VirtualHost> 

 httpd에서 직접 VirtualHost를 구성할 수도 있습니다. .conf 파일. 
2. 원격 접속 권한 설정:

1. 방화벽 설정

2. 구성 파일 수정:

/etc/httpd/conf /httpd.conf

<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

3. 일반 명령

/bin/systemctl start httpd.service     #启动
/bin/systemctl restart httpd.service   #重启
/bin/systemctl status httpd.service    #查看状态

위 내용은 내용의 측면을 포함하여 Apache 사용에 대한 팁을 소개합니다. PHP 튜토리얼에 관심이 있는 친구들에게 도움이 되기를 바랍니다.

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.