0
apache2를 사용하여 우분투 10.04 노트북에 워드 프레스 멀티 사이트를 설정하려고합니다.하위 도메인을 어떻게 설정할 수 있습니까?
일반적인 WordPress의 경우/etc/hosts 파일에 항목을 만들고/etc/apace2/sites-available 디렉토리에 가상 호스트 항목을 만든 다음 사이트 사용 가능 디렉토리에 소프트 링크하십시오. 하위 도메인의 경우 서버 별칭 지시문을 추가했습니다. 그러나 그것은 아무 것도하지 않습니다. 구문 오류가 있습니까? 제발 조언.
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName mysite.com
ServerAlias mysite.com *.mysite.com
DocumentRoot /home/myhome/Sites/public_html/mysite.com
#if using awstats
ScriptAlias /awstats/ /usr/lib/cgi-bin/
#we want specific log file for this server
CustomLog /var/log/apache2/example.com-access.log combined
</VirtualHost>
@Jesse 무리가 : 아파치를 다시 시작하면 다음과 같은 경고를 제공합니다 :'NameVirtualHost에서 * : 80 더 VirtualHosts'이 없습니다. mysite.com을 삭제하고 * .mysite.com을 www.mysite.com으로 변경했습니다. 그것도 작동하지 않습니다. 매우 혼란. – ryy705
전체 httpd.conf 파일을 게시 할 수 있습니까? –
@Jesse Bunch : Ubuntu의 Apache는 httpd.conf에 의존하지 않습니다. httpd.conf와/etc/apache2/sites-enabled 디렉토리에있는 모든 것을 포함하는 apache2.conf를 사용합니다./etc/apache2/sites-available 디렉토리에 가상 호스트를 설정하고/etc/apache2/sites-enabled 디렉토리에있는 소프트 링크를 만듭니다. 내 컴퓨터에서 httpd.conf 파일이 비어 있습니다. 다음은 apache2.conf 파일입니다 : [link] http://pastebin.com/0TjKYxx1 [/ link]. 내 첫 번째 게시물에 붙여 넣은 mysite.com.conf라는 파일을 만들었습니다. – ryy705