Server :: Change Of Apache Httpd.conf Doesn't Work On CentOS/RedHat?
Jun 30, 2010
I've been trying to make install apache 2.1.8 and php 5.2.3 and work on them. After updating and installing some dependence files, apache and php could both be installed.
Then I tried to configure them. I added the following content to the end of Apache httpd.conf:
Code:
Then I run /path/to/apachectl start, and saw the message:
Quote:
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Then I remembered that I didn't include the rewrite module while making install apache. So I removed the 2 lines I just added to httpd.conf.
But, after running /path/to/apachectl stop and start again, I could still see:
Code:
When I use firefox to open http://host_ip:8080/, I could see "It works!". But when I open http://host_ip:8080/hello.php (the file is already under htdocs), firefox said
Quote:
Failed to Connect
Why and how to solve it?
I noticed that for some stupid reason, the conf file wasn't updated at all and the 2 erroneous lines were still there.
I have just configured CentOS server my new office. This is the first time I am using CentOS.
Whenever I am trying to change the webroot of the httpd server, it usually say "directory doesn't exist". whereas which can't be the case as it is home directory of the user.
To achieve this, what Do I need to do?
The second issue, I am facing that whenever I am adding new directories to public_html folder, it is not accessible. as the error page 404 is shown. I have changed the permissions to 0705 and ownership is also transferred to other user. What else is required to make new directories accessible by the web?
I've been scanning the apache2 docs for the past few days and have not come up with an answer my following issue:
In my httpd.conf file, at the very end, I have the line
Include conf/vhosts/vhost_*.conf
However, when I run apache checkconfig or try to start apache, it gives me the error:
httpd: Syntax error on line 993 of /etc/httpd/conf/httpd.conf: Could not open configuration file /etc/httpd/conf/vhosts/vhost_1.conf: Permission denied
It appears as if the Include line is correct - in terms of it grabbing the first virtual host conf file. However, I'm confused on the permissions. the /etc/httpd folder is owned by root:root, as are the subfolders. As a test, I chown'd the conf/vhost folder combination and all the vhost files to apache:apache to see if that made a difference, and it appeared to make no difference at all. The log files don't contain anything (assumed because apache isn't starting). If I place the contents of the vhosts in a singular vhosts.conf it works - with the permissions set to root:root. I'd like to avoid having to use one vhosts conf for the configuration I'm trying to achieve - as it would make my life a lot easier.
I am administoring a few websites and the latest website to be deployed has a few "unable to check htaccess file, ensure it is readable, referer: " errors in the apache-error log.
That is fine, becuase the directory doesnt contain a .htaccess file.
Is there a setting whereby I can turn off this error ?
I dont want to turn off checking for .htaccess files because some directorys have this file and use it.
I've got a dedicated server using whm/cpanel and there is a particular domain being hosted which contains a very elaborate .htaccess file which is full of mod_rewrite rules, among other things. I've been asked to try and get the contents of this .htaccess file into the httpd.conf (or some appropriate include file) to improve performance.
I've been reading this page and it's really confusing me: [url]
In the file usr/local/apache/conf/httpd.conf I see that there are two VirtualHost sections that appear to be relevant for my domain (which I'll call mydomain.com). The first listens on port 80 and the second is on 443. Seems to me that my apache directives in .htaccess would belong in this section. In the first section I see this:
Code:
In the second section I see this:
Code:
The problem with both of these is that the directory /usr/local/apache/conf/userdata does not exist, much less the full path to either of those files.
accidentally I do something wrong with my server and the httpd folder missing and I need it to setup my mail server and anyone can help me what can I do without reinstalling my Cent OS? Here is the error msg :
[root@mydomain etc]# service httpd stop Stopping httpd: [FAILED] [root@mydomain etc]# service httpd restart
We have apache installed at a directory other than the default location. There are two httpd.conf files on the server, one at the apache installation directory, and the other one is the default one at /etc/httpd/conf. The apache ran very well with the customized httpd.conf before, but after I installed php 5, the server seems taking the default httpd.conf and doesn't display the html pages which are installed at our apache directory. How to let the server know not to use the default httpd.conf and use the customized one instead?
I've been trying to figure out how to set up my Apache 2 running on Ubuntu 9.10 to provide a reverse proxy so I can see my wifi network camera monitoring my dogs and still have access to my family website. First, I followed the suggestions from this thread on Ubuntu forums: [URL]. I set up a similar rule set at the end of my /etc/apache2/sites-available/default, restarted apache -- from which I got a response saying that Apache2 could not determine the server name -- and then tried logging into my server through its ip address. When I tried http://192.168.2.80/dogCam, I just got a 404 error. Here's what I added: (I also tried my domain name, but it also didn't work.)
When I looked at many other threads, I get recommendations to have my setup in httpd.conf. But, in both this server and a freshly installed Ubuntu laptop, my httpd.conf file is empty! I tried copying and pasting the recommended contents of the following thread, with the example proxy paths replaced with the ones I needed: [URL]. Straight-forward tutorials don't seem to apply, as Ubuntu has a blank httpd.conf file. I figured out that Ubuntu seems to load its modules by simply adding soft-links to the modules of interest from modules-enabled to modules-available. But, after a full day of trying to figure out what looks to be fairly simple and well-documented, I am at a loss for setting up this reverse proxy or even figuring out where to set ServerName to define my domain name to Apache2 in Ubuntu.
when i load lilo, everything is greenish and weird, i tried to change the picture with Lilo.conf, fallowing the exact instruction given by linux forum, dosnt work. the linux logo got verry strange colors has well,verry ugly.
at first i tried to install my ati driver, but my x1800 is not supported anymore, so i decided to run xconfsetup to use the default ati driver. After that i have been in the xorg.conf generated by the setup and it seem they got the right driver, it say radeon in the device section. another problem i experience is that everytime i lod KDE my default resolution suck, and when i open the control panel and click on display, everything goes right.
the last problem is more serious, when i order my computer to shutdown either by command line or with the logout button, the screen goes black and nothing happen at all. Its sad beccause so far everything else seem to work fine, i installed my network card and my sound card properly.
installed a new centOS 5 server, and after the installation, everything seem to work well but for httpd not running. when i try to issue the restart command i get the following error:
[root@appdev ~]# service httpd restart Stopping httpd: [FAILED] Starting httpd: httpd: Syntax error on line 206 of /etc/httpd/conf/httpd.conf: Cannot load
How to back up my httpd.conf from my server to my computer and only found one solution via a google search
[url]
I typed in locate httpd.conf and see that it resides in /usr/local/apache/conf/httpd.conf so I assume I would type $ cd /usr/local/apache/conf $ sudo cp -p httpd.conf httpd.conf.bak
I wanted to confirm this with an expert before I do damage that I cannot reverse.
I have just installed Fedora 11 on a "fresh machine" and everything works ok, except for Apache httpd the message seen in the error_log is the following: Name or service not known: mod_unique_id: unable to find IPv4 address of "myserver"
This is not intended to teach you about http.conf and its various options. This guide is intended to help with speeding up your web servers by assisting in protecting them from petty abuse, such as hotlinking and scraping, and by using options that yield better performance in general. The methods used in this guide address general concepts, but the implementations of the methods are completely arbitrary, and are tailored to my needs. Each user may want to make their own modifications to suit their own setup. Again, this is a general guide, meant for instruction purposes only. I will go over each significant section in the file, and explain what it does, and the reasoning for it.
This assumes that you WISH to disable the ability to use .htaccess, and to administrate your websites on the server level. If you have a shared hosting plan then you cannot administrate your server at all, and so some of these sections will not apply to you, but some of them will; the ones that still do, you will place in your .htaccess file, in place of your httpd.conf.
Some of the options in these files are default, and so they may not be explained at all. This thread is more about the non-standard configurations.
Most of these options are standard. Notice that there are extra AddTypes, for things such as .xpi files (firefox plugins, etc), and .ogg video files.
Also take note that we disable the option for .htaccess. This makes a dramatic speed increase. This is because if .htaccess is enabled, then for each request made to your server, apache must look in the directory where the requested file resides for an .htaccess file (it does not matter whether one is there or not, and the lookup is NOT cached, so it much be performed EACH request). If apache finds a file, it must parse it. Then it must look in the parent directory, and in the parent's parent, and so on, until it reaches root (/). This is done for EACH and EVERY request. Disabling .htaccess and administrating your server at the global level will make a dramatic difference on busy servers. On not so busy servers, you may not notice the difference.
Note that we disabled cgi-bin completely. This is because we're running mod_php, so we don't need cgi-bin. If you're not using it, lock it down so that no one else can .
Also note that we used AddOutputFilterByType to make sure that all text files were compressed before being sent across the wire. This saves bandwidth.
Of this section, most of these options cannot be set in .htaccess. Options such as the addtype and addhandler and addencoding CAN be set in .htaccess; the rest are global/sever level only.
I am a network/system Administrator in an avg. based company, we are using Cent Os as servers. We are developing applications in both php & java, for java we are using apache tomcat as server (port number 8080) & for php we are using apache as server (port 80). Php applications are uploaded in the server and giving the link to our clients like localhost.com/chrome. Now we are planning to give the java based application for testing purpose to clients & can give the application link to client as localhost.com:8080/mozilla. Is it is possible to change the link localhost.com:8080/mozilla to localhost.com/mozilla with out changing the portnumber of apache tomcat server & without interrupting the php applications, that means our clients can access php application as localhost.com/chrome & java application as localhost.com/mozilla in the same server at the same time.
phpmyadmin files are in usr/share/phpmyadmin but i cant find anything in my apache2.conf or httpd.conf files that point to that directory.How do I find the route taken from the Server root "ServerRoot "/etc/apache2"" to the phpmy admin files.
I'm running CentOS 5.3 64bit and from the get go I've had problems with the Apache server.More specifically, on what seems to be a random occurance, the apache server stops to respond.The process is still running, but nothing happens with it, and it is not responding.The /var/logs/httpd/error_log is blank for the occurance and only shows an entry after I give it a restart.So I'm a bit confused about what is going on.With that said, I need to make sure the httpd is working one way or another.I don't want to force a restart service every 10 minutes as this seems a bit too much.However, I do want to have the following:
run a crond every minute to do:If it fails, then do service httpd restart (and log the failure and restart to a file and email me a message).Any pointers on how to do that?It ain't the pretty solution, but it will save me from a very angry user until I'll figure what is the real cause for this failure.
this might not be a Centos related issue, but since I'm using Centos I guess it doesn't hurt to ask; I've used Ubuntu before and haven't encountered this. So, I've just installed Centos and Webmin and now I'm trying to configure the server. Problem is that on the Apache configuration page I don't have the option (should be there) to configure the Apache modules. I've attached a file to show where the modules option should (as before) appeared.
Running CentOS 5 x64 And today my httpd is running very slow and I can't find a fix. Looked all over different forums
When starting httpd I get the message: /var/lock/subsys/httpd': No space left on device I checked that directory above and there is no file called httpd tried rebooting server
Can't do updates too: [root@u15438957 ~]# yum update Loaded plugins: fastestmirror, priorities rpmdb: unable to join the environment
I have a requirement of using a wildcard certificate for 5 subdomains running under apache httpd server and 1 subdomain under tomcat.Is there any possibility of using the single wildcard certificate both in tomcat and apache
I turned my home PC running Ubuntu 10.04 into a server, and so i am so lost, after reading like a 10-20 different guides and/or official docs, I am totally lost.
All I wanted was to create a custom 404 error page...i read about how people edited .htaccess files to customize error pages, i tried and failed also, editing apache2.conf, I got lost and i dont wanna mess up everything and also, how you're supposed to not touch either of those as its not how it should be done and instead you need to edit httpd.conf and i did and FAILED! again...
Also how do I make it so that I can make subdomain(s) on my site? and wth is a name server and where do I get one?
When I do " ps aux | grep apache " I can see that apache2 is running. But when I do the same thing for http or httpd there is nothing. I looked for this question in the forums but couldn't find it. I probably don't know just what to look for.I'm using the new Debian Squeeze, and was fooling around heavily with new software installations and modifications, and just noticed all of a sudden that I couldn't get on the internet - so I know I did something but don't know what.I can plug in a thumb drive with a bitnami joomla stack on it and run, " ~/tmp/joomla-1.6.0-0/./ctlscript.sh start "and that gets things going for the joomla stuff (apache, http, mysql, php), but that stuff is pretty self contained and does not effect the browser's attempt to reach the web.
I just installed Centos 5.5 on one of my systems today and something is eluding me. Basically I had a web site and forum software (phpBB, but I don't think it's that, other forum software like Xoops does the same thing) running on Fedora 13, and I copied it over to the new Centos installation. Apache is running fine and displays a PHP test file and .html files just fine.
MySQL seems to be fine, I can log into that, show databases etc. Just can't get any forum software to know there is MySQL there. I did change the path of the site, and the databases, and edited /etc/my.cnf and /etc/httpd/conf/httpd.conf to reflect that. Thought I made the needed changes in /etc/php.ini but who knows. Seemed like everything should have tar'd up and moved easy, but not the case...
I am trying to setup Fedira 12 Linux Apache in my home network. I am able to access the hosted website from inside my home network without any problem. I am facing the problem to access it from outside. At the moment i have connected the Apache directly to DSL modem for testing purpose. I was reading "The ISP may have blocked the HTTP port 80. So check it by connecting the Apache directly to DSL modem." The temporary network connections for testing purpose are as follows..
DSL modem (SIEMENS Speed Stream 4200)-->Fedora 12/Linux Apache Server
I am even unable to PING the real ip (IP for DSL modem).(Firefox gave me error message "Connection Timed out) I have tried to ping it from the internet.I can PING the DSL from Apache without any problem.
1. Why i am even unable to PING the real IP of DSL modem at my home.?
2. Is it possible to run/setup Apache by using this type of DSL modem?
3. DSL modem has real IP. DSL MODEM assigns private IP (192.168.x.x) to Apache. So when a http request form the internet came to DSL modem on port 80, will it forward to Apache automatically.? or i have to made any changes.(I can not see anything in DSL modem to change/modify), OR do I have to use another DSL MODEM/Equipment (router)? This setup is just temporary. The actual design is as follows
DSL MODEM(Speed Stream 4200)-->Fedora 12 Linux ROUTER--->Internal network with DNS/Apache Server
my task is to store the data to a file at server sent via HTTP POST, i written suitable cgi script in C, but the PROBLEM is that i can't complete the task, I guess i require server permission to do so, how to configure server or how to get access right from server to store data to a file.