Last active
October 2, 2015 18:20
-
-
Save merolhack/2366217ec177d61be24c to your computer and use it in GitHub Desktop.
REHL(CentOs & Oracle Linux): Instalación y configuración de Apache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Instalar Apache de los repositorios de REMI | |
yum --enablerepo=remi install httpd -y | |
# Iniciar servicio | |
service httpd start | |
# Iniciar servicio al iniciar el sistema | |
chkconfig httpd on | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Agregar regla a IPTables para el puerto 80 | |
iptables -I INPUT 5 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT | |
# Guardar regla: | |
service iptables save | |
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ] | |
# Revisar configuración de IPTables | |
service iptables status |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nano /etc/sysconfig/httpd | |
+ HTTPD_LANG=en_US.UTF-8 | |
+ export LANG=en_US.UTF-8 | |
nano /etc/httpd/conf/httpd.conf | |
+ # Locale lang | |
+ SetEnv LANG en_US.UTF-8 | |
+ SetEnv LC_ALL en_US.UTF-8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Habilitar el estado del servidor | |
nano /etc/httpd/conf/httpd.conf | |
# | |
# Allow server status reports generated by mod_status, | |
# with the URL of http://servername/server-status | |
# Change the ".example.com" to match your domain to enable. | |
# | |
<Location /server-status> | |
SetHandler server-status | |
Order deny,allow | |
Deny from all | |
Allow from all | |
</Location> | |
# Habilitar la información extendida del estado del servidor | |
nano /etc/httpd/conf/httpd.conf | |
# | |
# ExtendedStatus controls whether Apache will generate ""full"" status | |
# information (ExtendedStatus On) or just basic information (ExtendedStatus | |
# Off) when the ""server-status"" handler is called. The default is Off. | |
# | |
ExtendedStatus On | |
# Habilitar la información del servidor | |
nano /etc/httpd/conf/httpd.conf | |
# | |
# Allow remote server configuration reports, with the URL of | |
# http://servername/server-info (requires that mod_info.c be loaded). | |
# Change the ".example.com" to match your domain to enable. | |
# | |
<Location /server-info> | |
SetHandler server-info | |
Order deny,allow | |
Deny from all | |
Allow from all | |
</Location> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nano /etc/httpd/conf/httpd.conf | |
- ServerSignature On | |
+ ServerSignature Off | |
- ServerTokens OS | |
+ ServerTokens Prod | |
- Options Indexes FollowSymLinks | |
+ Options -Indexes FollowSymLinks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nano /etc/httpd/conf/httpd.conf | |
# | |
# This should be changed to whatever you set DocumentRoot to. | |
# | |
<Directory "/var/www/html"> | |
# | |
# Possible values for the Options directive are "None", "All", | |
# or any combination of: | |
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews | |
# | |
# Note that "MultiViews" must be named *explicitly* --- "Options All" | |
# doesn't give it to you. | |
# | |
# The Options directive is both complicated and important. Please see | |
# http://httpd.apache.org/docs/2.2/mod/core.html#options | |
# for more information. | |
# | |
Options Indexes FollowSymLinks | |
# | |
# AllowOverride controls what directives may be placed in .htaccess files. | |
# It can be "All", "None", or any combination of the keywords: | |
# Options FileInfo AuthConfig Limit | |
# | |
AllowOverride All | |
# | |
# Controls who can get stuff from this server. | |
# | |
Order allow,deny | |
Allow from all | |
</Directory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment