suse Linux 自带apache安装配置
若service apache2 start可以执行,说明Apache2已安装(若未安装先安装,用yast2安装),直接修改httpd.conf即可,启动若报错,执行以下命令
SuSE-SWSB-WEB-01:/etc/apache2 # service apache2 start Starting httpd2 (prefork) Syntax error on line 58 of /etc/apache2/httpd.conf: Invalid command 'ProxyRequests', perhaps misspelled or defined by a module not included in the server configuration The command line was: /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf failed SuSE-SWSB-WEB-01:/etc/apache2 # service apache2 status Checking for httpd2: unused SuSE-SWSB-WEB-01:/etc/apache2 # a2enmod proxy --启动proxy 执行reload命令:/etc/init.d/apache2 reload SuSE-SWSB-WEB-01:/etc/apache2 # service apache2 status Checking for httpd2: unused SuSE-SWSB-WEB-01:/etc/apache2 # service apache2 start Starting httpd2 (prefork) httpd2-prefork: Could not reliably determine the server's fully qualified domain name, using 172.16.51.27 for ServerName done SuSE-SWSB-WEB-01:/etc/apache2 # SuSE-SWSB-WEB-01:/var/log/apache2 # a2enmod proxy_http --启动proxy_http |
编辑/etc/apache2/httpd.conf
增加以下内容:
ProxyPass /cc/ http:*.*.*.*:8080/cc/
ProxyPassRevers /cc/ http:*.*.*.*:8080/cc/
apache默认首页在httpd.conf文件中的 DirectoryIndex 中配置。(可通过修改首页实现首页跳转功能)
编码:
标签:11,03,01,SuSE,WEB,SWSB,apache2,etc,2021
来源: https://blog.csdn.net/zkl718/article/details/114654960