论坛风格切换
  • 6404阅读
  • 4回复

[apache]apache域名绑定,启动,伪静态,一帖通 [复制链接]

上一主题 下一主题
离线太史慈
 

发帖
766
金币
626
威望
556
只看楼主 倒序阅读 使用道具 楼主  发表于: 2011-07-19
— 本帖被 云天河 执行加亮操作(2011-07-20) —
nginx域名绑定,启动,伪静态,一帖通http://phpwind.me/290.html
apache域名绑定,启动,伪静态,一帖通http://phpwind.me/291.html
iis域名绑定,启动,伪静态,一帖通http://phpwind.me/292.html


首先,先判断服务器上有没使用apache,可以使用命令
  1. ps -aux|grep apache

有时启动的名字不是叫apache,那么需要
  1. ps -aux|grep httpd



说明apache启动正常,我们找到nginx的配置文件/aliyun/webserver/apache2.2.15/conf/httpd.conf,打开后
[url=http://www.phpwind.com]phpwind[/url]
离线太史慈

发帖
766
金币
626
威望
556
只看该作者 沙发  发表于: 2011-07-19
如何绑新的域名
apache的配置文件里面有类似这么一段
  1. <VirtualHost *:80>
  2.     ServerAdmin admin@domain
  3.     DocumentRoot /alidata/www/wwwroot/phpwind
  4.     ServerName 127.0.0.1
  5.     ServerAlias 127.0.0.1
  6.     #Alias /mysql_manager /alidata/www/wwwroot/mysql_manager
  7.     ErrorDocument 404 /404.php
  8.     DirectoryIndex index.html index.php index.htm
  9.     <Directory "/alidata/www/wwwroot/phpwind">
  10.          Options +Includes
  11.          AllowOverride None
  12.          Order allow,deny
  13.          Allow from all
  14.     </Directory>
  15. </VirtualHost>


把这段复制一份,即添加了一份新的站点,其中参数的作用,我们来解释一下:
ServerAdmin 没什么作用,名字而已
DocumentRoot 网站根目录
我现在想绑定域名www.phpwind.me,phpwind.me,可以这样写
  1. ServerName www.phpwind.me
  2. ServerAlias www.phpwind.me,phpwind.me

记得用逗号。
[url=http://www.phpwind.com]phpwind[/url]
离线太史慈

发帖
766
金币
626
威望
556
只看该作者 板凳  发表于: 2011-07-19
重启apache
启动方法1:
/aliyun/webserver/apache2.2.15/bin/apachectl restart

启动方法2:
/aliyun/webserver/apache2.2.15/bin/httpd -k restart
[url=http://www.phpwind.com]phpwind[/url]
离线太史慈

发帖
766
金币
626
威望
556
只看该作者 地板  发表于: 2011-07-19
apache的伪静态如何开启
[url=http://www.phpwind.com]phpwind[/url]
离线太史慈

发帖
766
金币
626
威望
556
只看该作者 4楼 发表于: 2011-07-20
apache 重定向301和错误页面404和502等
[url=http://www.phpwind.com]phpwind[/url]
快速回复
限100 字节
如果您在写长篇帖子又不马上发表,建议存为草稿
 
提到某人:
选择好友
上一个 下一个