You are here: Articles > Internet > HTTP

 See more articles about "HTTP "

Test the Apache configuration file httpd.conf

 

After making changes to the Apache configuration file, it is a good practice to test the configuration before implementing it.

To test the Apache configuration file for errors:



apachectl configtest



If the configuration file is fine, this command will return Syntax Ok. Otherwise, it will return detailed information about the error discovered.



If apachectl is not in your PATH and you don't know where it is, refer to the recipe Find a file by name to find the location of apachectl, then run it with the fully qualified path, for example:



/usr/local/apache/bin/apachectl configtest

 

Also see ...

Password protect a web directory with .htaccess
H3Apache references the .htaccess file in web document directories for access control information and other uses. A simple configuration allows password protection with multiple username/password combinations./H3PIn the directory to be protected, create a .htaccess file with contents like thi

Rewrite domain.com to www.domain.com using htaccess in Apache
H3You may want all visitors to your site using www in front of your domain name (www.yourdomain.com) instead of just your domain name (yourdomain.com). By implementing a simple .htaccess RewriteRule, visitors to yourdomain.com will see the URL change in their browser as they are redirected to the

HowTo: Reboot the Apache Server Safely
H3What do you do when you server freezes? This explains the safest steps for rebooting your apache webserver./H3PWe've all been there. You try to access your site and nothing works. You can ping and login through your shell, but apache isn't spitting out any info. Here is how to fix it. b

Friendster : Removing Friendster Logo using CSS
H3Removing Friendster Logo in your profile using CSS./H3PHere's the code: (put this on on CSS codebox.) br / br /span style="font weight: bold"navigation img{width:0px;}/span br / br /*By giving an img a width of 0px, you essentially hide an object from the browser using only CSS

Meta Refresh to Redirect
H3Easy way of using the meta refresh tag to redirect users/H3PThis recipe describes the meta refresh technique of redirecting users. By placing this tag in your span style="font weight: bold"head/span section of your html file, the user will be directed to another page after a set number