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
本文出自 “关注敏捷开发” 博客,转载请与作者联系!
-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
本文出自 “关注敏捷开发” 博客,转载请与作者联系!
相关文章推荐
- sun服务器Solaris9安装
- Solaris下cvs服务器的安装与配置
- 安装ORACLE10g for sun solaris
- Solaris下cvs服务器的安装与配置
- 安装ORACLE10g for sun solaris
- SUN的solaris 10安装教程
- SUN服务器Solaris10安装步骤
- solaris 上安装web服务器tomcat
- SUN服务器Solaris系统下Oracle数据库恢复的启示
- 在Solaris下安装CVS服务器文档
- 在Solaris下安装CVS服务器文档
- Sun的solaris 10 安装
- SUN 公司Solaris 10 安装过程详解
- Sun Solaris Sybae客户端”安装”日记
- SUN服务器及Solaris Serial Console常见设置问题
- sun solaris安装11g,界面打不开
- 如何在Windows下安装Tomcat服务器
- 通过ILO或ILO2 端口链接到服务器进行配置服务器和安装系统,管理服务器
- ubuntu下SVN服务器安装配置
- Linux下Web服务器环境搭建LNMP一键安装包 v2.5[20140702更新]