声明:以下内容来自“售后支持”
 
如何添加网站for linux(绑定域名)
以下配置的路径以阿里云提供的标准环境路径为准,如果您另行安装,请根据实际安装路径配置。
1、 登录您的Linux云服务器,进入WEB服务器配置文件夹;
运行命令:cd /aliyun/webserver/apache2.2.15/conf
 
2、 备份WEB服务器配置文件;
运行命令:cp httpd.conf httpd.conf.bak
 
3、 修改WEB服务器配置文件;
运行命令:vi   httpd.conf
 
4、 添加网站配置信息;
1)
 <VirtualHost *:80> 
        ServerAdmin 
admin@domain 
        DocumentRoot /alidata/www/wwwroot/phpwind 
        ServerName 127.0.0.1 
        ServerAlias 127.0.0.1 
        #Alias /mysql_manager /alidata/www/wwwroot/mysql_manager 
        ErrorDocument 404 /404.php 
        DirectoryIndex index.html index.php index.htm
       <Directory "/alidata/www/wwwroot/phpwind"> 
              Options  Includes 
              AllowOverride None 
              Order allow,deny 
              Allow from all 
        </Directory> 
</VirtualHost> 
DocumentRoot /alidata/www/wwwroot/phpwind 和 Directory "/alidata/www/wwwroot/phpwind" 都是指定网站的目录,需要一致。 
ServerName 127.0.0.1 绑定的网站域名 
ServerAlias 127.0.0.1 绑定的网站别名(您如果有多个域名添加在这里) 
DirectoryIndex index.html index.php index.htm 设置默认首页
 
2) 保存修改。按ESC键,输入”:wq”后回车;
3) 使配置生效。运行命令:../bin/apachectl graceful
4) 测试网站。请在浏览器中输入域名,测试设置。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。