On Mac OSX, the default localhost folder is located at /Library/WebServer/Documents P.S Tested with MacOS Sierra, 10.12.6 Find httpd.conf By default, Apache is enabled and installed in /etc/apache2/, inside httpd.conf file, find DocumentRoot to tell where is the default localhost folder. sudo vim /etc/apache2/httpd.conf # DocumentRoot: The directory out of which you will serve your […]

Read more Mac OSX – where is default localhost folder?

If you are running Linux system, high chance Apache is already installed by default. In case, you can use the following commands to determining whether Apache is already installed. In RPM system like Fedora Core Issue httpd -v or /usr/sbin/httpd -v [root@snake init.d]# httpd -v Server version: Apache/2.2.11 (Unix) Server built: Mar 6 2009 09:12:25 […]

Read more How to determining whether Apache is already installed?

I hit the Apache server error (13)Permission denied: make_sock in my console, while i try to start the Apache http server with the ./apache2 start script under init.d folder. mkyong@mkyong-desktop:/etc/init.d$ ./apache2 start * Starting web server apache2 apache2: Could not reliably determine the server fully qualified domain name, using 127.0.0.1 for ServerName (13)Permission denied: make_sock: […]

Read more Apache error – (13)Permission denied: make_sock: could not bind to address

Often times, as server administrator, have to telnet or SSH to their server to restart the Apache Http services. The Apache http services are usually located at the following location, 1) init.d start script folder. issue “./apache restart” to restart it debian:/etc/init.d# ./apache restart Forcing reload of web server (apache)… waiting . debian:/etc/init.d# 2) usr/local/apache/bin […]

Read more How to restart apache services in unix?

There is two ways to install Apache Http server on Ubuntu : Use apt command to install it automatically. Configure and build the source code, and install it manually. 1. Install it automatically 1. Search Apache package with “apt-cache search” command apt-cache search apache 2. Get Apache package name “apache2”, issue the “apt-get” install command. […]

Read more How to install Apache Http server on Ubuntu

Problem While accessing the PHP file, it display as “application/x-httpd-php” downloading instead of interpreted properly by Apache. See figure below : Solution The PHP downloading issue is caused by the Apache didn’t load the PHP module properly. 1. Find and edit Apache configuration file, which should be able to find at $APACHE_PATH/conf/httpd.conf. 2. Make sure […]

Read more PhP file display as downloading instead of interpreted by Apache