Posted On March 31, 2019

Apache HTTPd

kimconnect 0 comments
blog.KimConnect.com >> Codes , Linux >> Apache HTTPd
# Install Apache
yum install httpd

# Configure Apache
vim /etc/httpd/conf/httpd.conf
##### Change port
NameVirtualHost 127.0.0.1:8080
Listen 127.0.0.1:8080
#####
#### Set DocumentRoot
DocumentRoot "/var/www/kimconnect"
#####

# Install PHP5
yum install php
# Create phpinfo() page
echo "<?php phpinfo(); ?>" | sudo tee /var/www/kimconnect/info.php

# Configure firewall
firewall-cmd --permanent --zone=public --add-port=8080/tcp
firewall-cmd --reload

# Set security context for Apache
setsebool -P httpd_can_network_connect on

systemctl enable httpd
systemctl start httpd
systemctl status httpd

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

A Few Todos while Securing Apache Server

- Install mod_security - Set expose_php = Off in php.ini - Set SecResponseBodyAccess Off in…

Kubernetes – Pausing Applications by Scaling Deployments or Stateful Sets

# Pause application kubectl scale deploy nextcloud --replicas=0 kubectl scale statefulsets nextcloud-db-postgresql --replicas=0 kubectl scale…

PowerShell: SMB Shares Migration

$object='\\fileserver\sharename' $identity='domain\account' $permissions='Full' function importNtfsSecurity{ try{ set-executionpolicy unrestricted -force # Include the required NTFSSecurity library…