-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathletsencrypt
More file actions
69 lines (61 loc) · 2.62 KB
/
letsencrypt
File metadata and controls
69 lines (61 loc) · 2.62 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
*********************************************************************************************************
Apache:
1)yum install httpd
2)systemctl enable httpd
3)systemctl start httpd / systemctl stop httpd / systemctl restart httpd / systemctl reload httpd
4)systemctl status httpd
5)vi /etc/httpd/conf/httpd.conf
Options Indexes FollowSymLinks ---> Options None
*********************************************************************************************************
webconfig:
#chown -R apache:apache /var/www/html
#find /var/www/html/ -type d -exec chmod 770 {} \;
*********************************************************************************************************
PHP
1)yum install php
2)vi /etc/php.ini
short_open_tag = Off ---> short_open_tag = On
*********************************************************************************************************
Firewall:
1)firewall-cmd --permanent --zone=public --add-service=http
2)firewall-cmd --permanent --zone=public --add-service=https
3)firewall-cmd --reload
*********************************************************************************************************
Remove Firewall:
1)firewall-cmd -h
2)rpm -qa *firewall*
3)yum remove firewalld
4)iptables -L -n
*********************************************************************************************************
Iptables:
1)yum install iptables-services
2)systemctl enable iptables
3)systemctl start iptables
4)/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
5)/sbin/iptables -I INPUT -p tcp --dport 443 -j ACCEPT
6)service iptables save
7)iptables -n -L
*********************************************************************************************************
Letsencrypt:
1)mkdir /etc/httpd/sites-available
2)mkdir /etc/httpd/sites-enabled
3)vi /etc/httpd/conf/httpd.conf
add--->IncludeOptional sites-enabled/*.conf
4)vi /etc/httpd/sites-available/example.com.conf
add--->
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/html
ErrorLog /var/log/httpd/error.log
CustomLog /var/log/httpd/access_log combined
</VirtualHost>
5)ln -s /etc/httpd/sites-available/example.com.conf /etc/httpd/sites-enabled/example.com.conf
6)service httpd restart
7)yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
[subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms" --enable "rhel-ha-for-rhel-*-server-rpms"]
8)yum -y install yum-utils
[yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional]
9)yum install certbot python2-certbot-apache
10)certbot --apache
--->example.com--->1