-
. WIKIMERIONET
Merion Mertics , ,

CRM

5

Apache - opensource -. LAMP (Linux, Apache, MySQL, PHP), . Windows nginx, Apache Linux.

 Apache  Linux

nginx Linux, .


- Apache Linux

Apache CentOS RHEL

, :

sudo yum update

Apache :

sudo yum y install httpd

httpd - Apache CentOS. y .

sudo yum y install httpd

, Apache .

Apache Ubuntu Debian

Ubuntu Debian Apache apache2. apt.

sudo apt update

Apache:

sudo apt install apache2	

- Apache

Apache - , . Debian Ubuntu , CentOS .

CentOS httpd, Debian Ubuntu apache2

Apache, :

sudo systemctl start httpd

, .

Apache :

sudo systemctl enable httpd	

Apache:

sudo systemctl status httpd
sudo systemctl status httpd

Apache ( , ):

sudo systemctl reload httpd

Apache:

sudo systemctl restart httpd

Apache:

sudo systemctl stop httpd

Apache :

sudo systemctl disable httpd

- Apache

Apache - - . Apache , .

Apache

IP- :

hostname -I | awk '{print $1}'

ip addr show ifconfig, . ip .

- IP-, . HTTP- Apache, :

Apache CentOS

, Ubuntu:

Apache Ubuntu

, curl:

curl [your_system's_IP_address]:80
. : 80 80, -. IP- [your_system's_IP_address].

HTML-

- HTML-, , :

HTML:

echo My Apache Web Server > /var/www/html/index.html

.

, , Apache , .


Apache

. , . - HTTP HTTPS 80 443.

:

sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload

, :

sudo firewall-cmd --list-all | grep services

http https .

UFW, HTTP (80) HTTPS (443), Apache Full:

sudo ufw allow 'Apache Full'

nftables , , :

nft add rule inet filter input tcp dport {80, 443} ct state new,established counter accept

Apache

Apache :

  • /etc/httpd/conf/httpd.conf - Apache
  • /etc/httpd/ -
  • /etc/httpd/conf.d/ -
  • /etc/httpd/conf.modules.d/ - Apache
. Apache, .

Apache :

  • /var/log/httpd/ - Apache
  • /var/log/httpd/access_log - ,
  • var/log/httpd/error_log - , Apache

. , , . :

  • /home/username/my_website
  • /var/www/my_website
  • /var/www/html/my_website
  • /opt/my_website