How to install apache on CentOS

Generally for our dedicated servers that come with CentOS the web server, apache 2 is already installed unless requested otherwise, but if you need to re-install it this is how you would do it.

This method also works with Fedora

First remove apache

# /sbin/service httpd stop

# yum remove httpd

# yum install httpd mod_ssl

# /sbin/service httpd start

The following command enables httpd service to autostart

# /sbin/chkconfig httpd on

To confirm

# /sbin/chkconfig --list httpd

config files are located in /etc/httpd/conf/ and /etc/httpd/conf.d/

modify httpd.conf for the main apache config.

Default root folder for the web server is in /var/www/html

If you make any changes to the config files you must restart apache.

# /sbin/service httpd restart

verify that it is working by going to http://<ip address>

这个回答有用吗?

 打印这篇文章

继续阅读

New webmin users cannot change password after "Force change at next login" is selected

New webmin users cannot change password after "Force change at next login" is selectedGo to...

How to check drive space

...

How to create a partition size larger than 2TB using parted

Linux has a 2TB limit on the partition size. Find the drive you want to partition # fdisk -l...

How to open ports within IPtables in Redhat 3/4/5 & Above | CentOS | Fedora Linux

How to open ports within IPtables in Redhat 3/4/5 & Above | CentOS | Fedora LinuxIPtables...

重设MySQL root密码

如果忘记了MySQL的root密码,可以用以下方法重新设置: 1. KILL掉系统里的MySQL进程; killall -TERM mysqld 2....

Powered by WHMCompleteSolution