netstat -nplt
service sshd start
ps -ef
reboot 重啟
systemctl enable httpd.service 設(shè)置httpd服務(wù)隨系統(tǒng)啟動(dòng)而啟動(dòng)
httpd服務(wù)換成別的服務(wù)也是一樣
HTTP協(xié)議的HOST頭域字段意義:
HOST字段可以使得在同一個(gè)web服務(wù)器提供多個(gè)站點(diǎn)的web服務(wù)成為可能
Apache的Virtualhost配置,配置文件最后加入:
<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/www/example/public_html
ErrorLog /var/www/example.com/error.log
CustomLog /var/www/example.com/request.log combined
<Directory /var/www/example/public_html >
Options FollowSymlinks
AllowOverride none
Require all granted
</Directory>
//Directory - apache權(quán)限
</VirtualHost>
防火墻打開(kāi)http/https服務(wù)
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
httpd(apache)配置文件路徑:
/etc/httpd/conf/httpd.conf
httpd(apache)模塊路徑:
/etc/httpd/conf.modules.d
httpd Web虛擬主機(jī)的文件路徑:
/var/www
MySql(mariaDB)配置路徑:
/etc/http/conf.d
安裝的服務(wù)路徑
/usr/sbin/
nginx搭建的服務(wù)器,web虛擬主機(jī)的文檔路徑
/urs/share/nginx/
配置路徑
/etc/nginx
自簽名證書(shū)
openssl req -new -x509 -nodes -days 365 -newkey rsa:1024 -out www.cry.com.crt -keyout www.cry.com.key
生成的證書(shū)和密鑰保存好
環(huán)境服務(wù):
httpd(apache) / nginx
php
mariadb-server mariadb
php-fmp
phpmysql
安裝數(shù)據(jù)庫(kù)web管理界面 epel-release -> phpadmin