一直都搞不好網址的設定,情況如下:
subdomain已setup好,可以使用
hkplog.com<-ok,無問題
sunkit.hkplog.com<-ok,無問題
我想要的是加入www.hkplog.com
以及我另外有gallery2的service,想要加入 gallery.hkplog.com
www.hkplog.com = hkplog.com(現在的summary頁面)
gallery.hkplog.com = hkplog.com/gallery2(現在的gallery2頁面)
翻過舊post,找到的方法是修改httpd.conf及dns.
httpd.conf已加入
<VirtualHost *:80>
ServerAdmin info@hkplog.com
ServerPath /hkplog.com
DocumentRoot /usr/local/httpd/htdocs/hkplog.com
ServerName hkplog.com
ServerAlias hkplog.com www.hkplog.com
ErrorLog logs/hkplog.com-error_log
CustomLog logs/hkplog.com-access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin info@hkplog.com
ServerPath /hkplog.com/gallery2
DocumentRoot /usr/local/httpd/htdocs/hkplog.com/gallery2
ServerName hkplog.com
ServerAlias gallery.hkplog.com
ErrorLog logs/hkplog.com-error_log
CustomLog logs/hkplog.com-access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin info@hkplog.com
ServerPath /hkplog.com
DocumentRoot /usr/local/httpd/htdocs/hkplog.com
ServerName hkplog.com
ServerAlias *.hkplog.com
ErrorLog logs/hkplog.com-error_log
CustomLog logs/hkplog.com-access_log common
</VirtualHost>
dns亦順序加入了
hkplog.com ip
www.hkplog.com ip
gallery.hkplog.com ip
*.hkplog.com ip
問題就是:
www.hkplog.com<-去不到summary頁面,到了id 1的blog.
gallery.hkplog.com<-去到但不完整,亦不能再進入頁面.
麻煩大家幫幫忙.
萬分感謝