`
yanshaozhi
  • 浏览: 107671 次
  • 性别: Icon_minigender_1
  • 来自: 东营
社区版块
存档分类
最新评论

How to use re-write module of Apache web server 2.2.3 on FC6 with new or refurbi

阅读更多

http://www.dharwadkar.com/weblog/apache_fc6_01

 

finished upgrading my web server to better hardware and latest OS and web server just yesterday. Whether you get better hardware after you buy refurbished laptops or brand new PCs, upgrading will help your computer run better. Installation of FC6 was seamless once I found out that I could not run XEN on my computer because of CPU limitations. My CPU does not have PAE on which XEN requires to operate. So finally I figured out that not installing virt-manager solves my problem by installing a non-XEN kernel (Duh!!). So once that problem was out of the way, I moved on to the next task of migrating my web server to the new box.

Migrating a Plone website from one box to another is very well documented. However, there are some things to watch out for which I will post here shortly. After a lot of research and trouble-shooting, I finally managed to get the Zope and Plone working on my box. Since Apache is much more secure, robust and modular in management, I use Apache server as a front-end to my website and use URL re-writing to have Apache forward those to Zope.

Last week I moved my website to the new box and copied the re-write configuration from the old httpd.conf file to the new one and switched off the old one. I did not test Apache functionality trusting that it would work in the new setup, if it worked in the old setup. On trying to access the URL, the browser refused to serve the page instantly throwing up a Error 503 on the screen. At first I thought, it was the new Apache server which did not understand the re-write commands from older (2.0.54) version and tried to find out what had changed. I checked forums, website and even Apache release and change notes, but could not find anything that could possibly solve my problem. I worked for around 4 hours on a wild goose chase and then gave up. As the site traffic had also returned to normal, the urgency to upgrade was also not there till yesterday when my son kept on switching off the box as it was accessible to him.

So I started my work again yesterday; this time on a fresh FC6 installation inside a VMWare and worked through the Virtual Hosting Monster and re-write tutorial from the Zope book just to make sure, I was doing everything correctly. The VHM was working correctly, but as soon as switched on Apache URL re-write I started getting the same errors. So it was not my configuration file or version issue with Apache. I again searched for the same and this time I was a bit more successful. One of the forums posts mentioned something about the permissions being correct and it lit a light in my head and I knew the problem was not with Apache but with permissions issue. I checked my error log (which I admit I should have done earlier, but since I am not really "expert" in Linux, I didn't do it. Partly because I never thought of it and mostly because I didn't know the location. Anyway.) and found the following entries in the error_log.

[Tue Nov 14 16:03:53 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:04:20 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:22:17 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:26:44 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:26:47 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:28:08 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:28:12 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:45:43 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:47:14 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed
[Tue Nov 14 16:47:17 2006] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (*) failed

I checked the permissions on all the folder and didn't find anything that would SE Linux Configurationhave caused any problems. Suddenly a thought came to my mind to check the security level issue as I had faced issues with security level (firewall) in the past. The only difference this time being, I disable Linux firewall as I have hardware firewall. So I opened up the Security Configuration screen and started reviewing the SELinux policy settings. As I have already mentioned I am not an expert in Linux, I started experimenting with the SELinux policy for HTTPD Service by enabling one setting at a time and checked if Apache URL re-writing worked or not. The second option I chose to "Allow HTTPD scripts and modules to connect to the network" did the trick and the re-writing started flowing correctly.

I made the similar change in my production web server and happily it started working and I was able to move the website to the new server and switch off the old one. Because I am not an expert in Linux and these things are not documented anywhere, I thought I would add my two cents to the documentation and make Linux a better OS and usable to non-techie guys like me. Now that SELinux is an integral part of Linux (at the Fedora and Ubuntu flavours) I am sure many more people will face this same issue. I hope this will help them to save time and effort that I had to spend to get this issue resolved. If there is a better way of doing this out there, please direct me to it so that I can update my piece and knowledge.

Category(s)
 
Linu
分享到:
评论

相关推荐

    jackson-module-jaxb-annotations-2.2.3-API文档-中文版.zip

    赠送原API文档:jackson-module-jaxb-annotations-2.2.3-javadoc.jar; 赠送源代码:jackson-module-jaxb-annotations-2.2.3-sources.jar; 赠送Maven依赖信息文件:jackson-module-jaxb-annotations-2.2.3.pom; ...

    jackson-module-jaxb-annotations-2.2.3-API文档-中英对照版.zip

    赠送原API文档:jackson-module-jaxb-annotations-2.2.3-javadoc.jar; 赠送源代码:jackson-module-jaxb-annotations-2.2.3-sources.jar; 赠送Maven依赖信息文件:jackson-module-jaxb-annotations-2.2.3.pom; ...

    nacos-server2.2.3 docker镜像

    目前docker官网最新版没有2.2.3,这是自己用的镜像 使用命令 docker load<nacos-server_2.2.3.tar 即可载入镜像

    ServerAgent-2.2.3.zip

    ServerAgent是Apache JMeter工具的一个重要组件,主要用来监控服务器的资源使用情况,如CPU、内存、磁盘I/O和网络流量等。JMeter是一款强大的性能测试工具,用于模拟多种用户并发行为,评估服务器在高负载下的表现。...

    ServerAgent-2.2.3

    "ServerAgent-2.2.3"是一款专用于服务器性能监控的工具,它能够帮助管理员实时监测并分析服务器的各项运行指标,确保系统稳定、高效运行。在这个版本中,ServerAgent可能包含了性能数据采集、可视化展示、告警机制、...

    nacos-server-2.2.3.zip

    在Windows环境下安装Nacos 2.2.3,首先你需要从官方网站或者通过给定的"nacos-server-2.2.3.zip"压缩包获取软件。这个压缩包包含了运行Nacos所需的所有文件,包括启动脚本、配置文件、依赖库等。解压后,你将看到一...

    Apache HTTP Serve 2.2.3

    Apache HTTP Server 2.2.3 是一个广泛使用的开源Web服务器,特别适合与PHP集成,以构建动态网站和Web应用程序。这个版本的Apache是许多开发人员和网站管理员的首选,因为它具有高度的可配置性、稳定性以及对多种编程...

    nacos-server-2.2.3.rar

    本压缩包"nacos-server-2.2.3.rar"包含了Nacos服务器的2.2.3版本,这是一个重要的中间件组件,对于理解和使用Java开发的微服务系统至关重要。 首先,Nacos的核心功能之一是**服务发现**。在分布式环境中,服务发现...

    jackson-annotations-2.2.3.jar jackson-core-2.2.3.jar jackson-databind-2.2.3.jar

    这个压缩包包含了Jackson库的三个核心组件的2.2.3版本:`jackson-annotations-2.2.3.jar`、`jackson-core-2.2.3.jar` 和 `jackson-databind-2.2.3.jar`。 1. **jackson-annotations-2.2.3.jar**: 这个模块提供了...

    【jmeter】ServerAgent-2.2.3.zip下载

    【JMeter】是一款广泛使用的开源性能测试工具,主要用于模拟大量用户并发访问Web应用程序,从而评估其性能和稳定性。ServerAgent是JMeter的一个扩展组件,它允许我们从远程服务器收集性能指标,这对于分布式测试和...

    ServerAgent-2.2.3支持麒麟,arm、jdk1.8

    标题“ServerAgent-2.2.3支持麒麟,arm、jdk1.8”揭示了这款名为ServerAgent的软件工具的最新版本2.2.3,它具有对多种平台和环境的兼容性。其中,“麒麟”指的是中国的开源操作系统,通常基于Linux内核,专为服务器...

    spring-boot-starter-web-2.2.3.RELEASE.jar

    spring-boot-starter-web-1.0.0.RELEASE.jar 各个版本,免费下载 spring-boot-starter-web.RELEASE.jar 各个版本,免费下载 spring-boot-starter-web.jar 各个版本,免费下载 如果不能免费下载,关注我,评论区联系...

    nacos配置中心nacos-server-2.2.3

    在这个“nacos-server-2.2.3”压缩包中,包含了运行Nacos配置中心所需的所有文件,这使得用户可以在中国大陆地区避免由于GitHub访问问题导致的下载困难。 Nacos的核心功能之一是配置中心,它允许开发者集中管理和推...

    apache server 2.2.3

    Apache Server 2.2.3 是一款广泛应用的开源Web服务器软件,它以其稳定性和灵活性而闻名。这个版本是在Apache HTTP Server系列中的一个较早的迭代,发布于2007年,提供了许多关键特性和改进。 1. **模块化设计**:...

    release-1600-x64-gdal-2-2-3-mapserver-7-0-7_gdal2.2.3_GDAL_GDALC

    标题"release-1600-x64-gdal-2-2-3-mapserver-7-0-7_gdal2.2.3_GDAL_GDALC"表明这是一个针对64位系统(x64)的软件发布包,版本号为2.2.3,与GDAL(Geospatial Data Abstraction Library)和MapServer有关。...

    jackson-annotations-2.2.3,jackson-core-2.2.3,jackson-databind-2.2.3

    这个压缩包包含了Jackson库的三个核心模块:`jackson-annotations-2.2.3`、`jackson-core-2.2.3` 和 `jackson-databind-2.2.3`,它们在JSON序列化和反序列化方面扮演着关键角色。 1. **jackson-annotations-2.2.3**...

Global site tag (gtag.js) - Google Analytics