-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapache-resource.sh
More file actions
31 lines (26 loc) · 1.01 KB
/
Copy pathapache-resource.sh
File metadata and controls
31 lines (26 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#APACHE ON LINUX
#IMPLEMENTING APACHE
#ALWAYS INSTALL AND CONFIGURE NGINX FIRST
sudo yum -y install httpd
sudo systemctl enable httpd && sudo systemctl start httpd
sudo systemctl status httpd.service
cd /var/www/
mkdir -p yourdomain.com/public_html
chown -R apache:apache /var/www/yourdomain.com/public_html
chmod -R 755 /var/www
sudo apt -y install apache2
sudo systemctl enable apache2 && sudo systemctl start apache2
sudo systemctl status apache2
mkdir /var/www/html/yourdomain.io
chown -R www-data:www-data /var/www/html/yourdomain.io
chmod -R 755 /var/www
nano /etc/httpd/conf/httpd.conf [On RHEL/CentOS]
nano /etc/apache2/ports.conf [On Debian/Ubuntu]APACHE ON LINUX
# [On Debian/Ubuntu]
# When using apache as a server behind a proxy do these
# 1. Enable mod_remoteip
sudo a2enmod mod_remoteip
# 2. Locate the vhost conf for the domain , then beneath the Document Root Initiative add the following line
RemoteIPHeader X-Forwarded-For
# 3. search for LogFormat and replace all %h with %a
nano /etc/apache2/apache2.conf