您的位置:首页 > 其它

sun服务器Solaris9安装

2009-05-27 17:16 260 查看
[root@localhost sbin]# ls -al apache*

-rwxr-xr-x 1 root root 3916 2009-09-04 apachectl

[root@localhost sbin]# vi apachectl // 脚本文件, 也可以直接运行service httpd start|stop|restart

[root@localhost sbin]# cd /etc/httpd/

[root@localhost httpd]# ls -al

总计 52

drwxr-xr-x 4 root root 4096 04-10 10:57 .

drwxr-xr-x 110 root root 12288 04-11 22:52 ..

drwxr-xr-x 2 root root 4096 04-11 22:00 conf // Apache配置文件目录

drwxr-xr-x 2 root root 4096 04-11 22:47 conf.d

lrwxrwxrwx 1 root root 19 04-10 10:57 logs -> ../../var/log/httpd

lrwxrwxrwx 1 root root 27 04-10 10:57 modules -> ../../usr/lib/httpd/modules // libphp5.so

lrwxrwxrwx 1 root root 13 04-10 10:57 run -> ../../var/run

[root@localhost httpd]# ls modules/libphp5.so

modules/libphp5.so

[root@localhost httpd]# ls conf/httpd.conf

conf/httpd.conf // httpd.conf Include ../conf.d/*.conf

[root@localhost httpd]# ls conf.d/*.conf

conf.d/manual.conf conf.d/python.conf conf.d/webalizer.conf

conf.d/perl.conf conf.d/squid.conf conf.d/welcome.conf

conf.d/php.conf conf.d/ssl.conf

conf.d/proxy_ajp.conf conf.d/virtualhost.conf

[root@localhost httpd]# vi conf.d/virtualhost.conf // 配置Virtualhost

NameVirtualHost *:80

#

# NOTE: NameVirtualHost cannot be used without a port specifier

# (e.g. :80) if mod_ssl is being used, due to the nature of the

# SSL protocol.

#

#

# VirtualHost example:

# Almost any Apache directive may go into a VirtualHost container.

# The first VirtualHost section is used for requests without a known

# server name.

#

<VirtualHost *:80>

ServerAdmin root@localhost

DocumentRoot /var/www/html

ServerName localhost

ErrorLog logs/phpweb20.errorlog

CustomLog logs/phpweb20.customlog common

</VirtualHost>

<VirtualHost *:80>

ServerAdmin root@phpweb20

DocumentRoot /website/phpweb20/htdocs // 需要关闭Selinux才能访问/var/www/html之外的目录

ServerName phpweb20

ErrorLog logs/phpweb20.errorlog

CustomLog logs/phpweb20.customlog common

</VirtualHost>

// 参考

//
http://blog.csdn.net/fcoolx/archive/2008/04/15/2294668.aspx

本文出自 “关注敏捷开发” 博客,转载请与作者联系!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: