From Fedora Project Wiki

No edit summary
Line 4: Line 4:
<pre>$ su root
<pre>$ su root
$ yum install httpd</pre>
$ yum install httpd</pre>
If you want SSL support install also openssl and mod_ssl
<pre>$ yum install openssl mod_ssl</pre>


Enable start on boot
Enable start on boot
Line 10: Line 13:
=== Create self signed certificate ===
=== Create self signed certificate ===


=== Install certificate ===
=== Install a certificate ===


== Configuration ==
== Configuration ==
Line 16: Line 19:
Configuration files are stored under <code>/etc/httpd/conf.d/</code> and <code>/etc/httpd/conf/httpd.conf</code> is the main configuration file
Configuration files are stored under <code>/etc/httpd/conf.d/</code> and <code>/etc/httpd/conf/httpd.conf</code> is the main configuration file


Apache uses port 80 by default. To make this service available from other computers or the Internet your have to allow Apache through the firewall like this
Apache uses port 80 for plain http connections and port 443 for SSL connections by default. To make this service available from other computers or the Internet your have to allow Apache through the firewall like this
 
For plain http connections
<pre>$ firewall-cmd --permanent --add-service=http</pre>
<pre>$ firewall-cmd --permanent --add-service=http</pre>
For SSL connections
<pre>$ firewall-cmd --permanent --add-service=https</pre>


However this exposes your computer to the Internet and potentially to attackers. Secure your installation properly before exposing your server to the Internet.
However this exposes your computer to the Internet and potentially to attackers. Secure your installation properly before exposing your server to the Internet.

Revision as of 20:08, 1 May 2014

The Apache HTTP Server is the main web server worldwide

Installation

$ su root
$ yum install httpd

If you want SSL support install also openssl and mod_ssl

$ yum install openssl mod_ssl

Enable start on boot

$ systemctl enable httpd

Create self signed certificate

Install a certificate

Configuration

Configuration files are stored under /etc/httpd/conf.d/ and /etc/httpd/conf/httpd.conf is the main configuration file

Apache uses port 80 for plain http connections and port 443 for SSL connections by default. To make this service available from other computers or the Internet your have to allow Apache through the firewall like this

For plain http connections

$ firewall-cmd --permanent --add-service=http

For SSL connections

$ firewall-cmd --permanent --add-service=https

However this exposes your computer to the Internet and potentially to attackers. Secure your installation properly before exposing your server to the Internet.