≡ Menu

Apache

How to list all virtual hosts in Apache?

Question - How do I test my virtual hosts configuration in Apache? Is there a way to list all virtual hosts and check my httpd.conf for errors? Virtual hosts allow you to share your IP address and your machine (VPS, shared hosting, dedicated server) for multiple domain names. You can create directories for each domain [...]

{ 0 comments }

The question - I need to check if Apache httpd and sshd are running on my Linux CentOS box. Is there a command that can be used to check if a service is running? There is a command called service that can be used to check if Apache httpd or OpenSSH sshd are running: On [...]

{ 0 comments }

How to install and start Apache on Linux?

The question - How do I install Apache on my Linux CentOS box? Also I want Apache to start automatically when I reboot my machine. Is there a Linux command that can help me do this? Apache is the most popular HTTP web server on the market. It is open source and completely free. Apache [...]

{ 0 comments }

How to restart Apache web server on Linux?

The question - How do I restart my httpd Apache process on my Linux box? You can use the apachectl command which is available on all Linux / Unix based systems. The command apachectl is an Apache HTTP server control interface. It allows you to use the these commands - restart/start/stop/graceful/graceful-stop. To restart Apache: apachectl [...]

{ 0 comments }

Question - I want to check if a website is using HTML compression while transmitting. This could be gzip or deflate compression. Is there a way to quickly test if a domain name sends its data compressed? Apache supports both gzip compression or deflate compression (using the mod_deflate module). It is also possible for PHP [...]

{ 0 comments }

Which username is Apache running on?

I need to find the username under which Apache is running on. How do I find this out? You can either achieve this using the command lsof or look in your httpd.conf file. Using lsof Type in the following command on your SSH shell session or your local terminal: lsof -i OR lsof -i | [...]

{ 0 comments }

The question - I recently installed Apache on my Linux box. I need to find the directory in which I should put my HTML files. How do I find the default document root that Apache httpd users? I am using CentOS. There is a directive called DocumentRoot in the httpd.conf file. First locate your http.conf [...]

{ 0 comments }

The question - I have several virtual hosts on my Apache config on my Linux CentOS box. How do I create a cgi-bin directory per virtual host? I want each virtual host to have a separate cgi-bin directory. Is there an Apache directive to do this? Apache httpd has a directive called ScriptAlias which points [...]

{ 0 comments }

How do I locate my cgi-bin directory on Apache?

The question - I am self managing my web hosting server. I need to find out where my cgi-bin directory is. How do I do that on my CentOS Linux box using Apache? The cgi-bin directory has all of your executables - perl scripts, compiled C++ applications etc. CGI stands for common gateway interface. The [...]

{ 0 comments }

Apache FreeBSD Jail Connect Error

The question is - In my Apache web server on FreeBSD, I get the following error in my Apache logs: [warn] (61)Connection refused: connect to listener on 0.0.0.0:80 How to fix this? In your httpd.conf, there must be a line like the following: Listen 80 Listen 443 Change these lines to be specific to IP [...]

{ 0 comments }