我在网上冲浪,我不知道发生了什么事。我翻过谷歌;)
如何为所有用户的帐户设置我的 VPS?你可以帮帮我吗?
例子:
服务器“顶级”域:srv1.myserver.com
- 客户域名:ubuntu001.com(现在可以了:www.myserver.com/~ubuntu001)
- 客户域名:garfield.net(现在可以了:www.myserver.com/~garfield)
我需要这种“格式”:
- ubuntu001.myserver.com 或 ubuntu001.com.myserver.com
- garfield.myserver.com 或 garfield.net.myserver.com
如何配置我的 CWP VPS(apache vhosts)?
感谢您的所有指导。
更新:
- 编辑这个 conf 文件:/usr/local/apache/conf.d/vhosts/myserver.com.conf
- 为 VirtualHost 块添加“ServerAlias”
- 在服务器上重新启动 Apache 服务
<VirtualHost 1.2.3.4:80>
ServerName ubuntu001.com
ServerAlias www.ubuntu001.com
ServerAlias ubuntu001.myserver.com
ServerAlias www.ubuntu001.myserver.com
ServerAdmin webmaster@ubuntu001.com
DocumentRoot /home/ubu001/public_html
[...]
<IfModule mod_setenvif.c>
SetEnvIf X-Forwarded-Proto "^https$" HTTPS=on
</IfModule>
<Directory "/home/ubu001/public_html">
Options -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
[...]
</VirtualHost>
我没事:http ://ubuntu001.myserver.com 我不工作: httpS: //ubuntu001.myserver.com
(myserver.com 是一个示例域)