Delete Set public Set private Add tags Delete tags
  Add tag   Cancel
  Delete tag   Cancel
  • • DevOps notes •
  •  
  • AI
  • Tags
  • Login

Apache and Nginx/shaare/kgztrA

  • linux
  • linux

Apache Web Server

  • dnf install httpd
  • nano /etc/httpd/conf/httpd.conf
  • nano /var/www/html/index.html
  • systemctl restart httpd
  • systemctl stop firewalld

NGINX

→ Web proxy → MTM between client backend servers
→ Web server

  • dnf install nginx -y
  • systemctl start nginx
  • systemctl enable nginx
  • lsof -i :80 → check port 80
  • systemctl stop firewalld
  • systemctl disable firewalld
  • nano /etc/nginx/nginx.conf

    • server { ... }
  • nano /etc/nginx/conf.d/myconf.conf

    • server { ... }
  • mkdir -p /var/www/mywebserver/html
  • nano index.html
  • nginx -t → check is everything ok
  • systemctl restart nginx

NGINX Reverse Proxy

On server → setup nginx as before

  • 403 error → sestatus (selinux status tool)

    • current mode → enforcing
    • fix: chcon -R -t httpd_sys_content_t /var/html/ → fix permission

On client

  • nano /etc/nginx/conf.d/myconf.conf

    server {
    location / {
      proxy_pass http://192.168.0.202; # server ip
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;
    }
    }
8 months ago Permalink
cluster icon
  • Linux File Links and Permissions : Links Soft Link (Symbolic Link) ln -s Link will be removed if the original file is removed or renamed. Hard Link ln Deleting, renaming, or moving t...
  • Basic File Commands / File Search Commands : touch one two three → Create 3 files mkdir folder → Make directory mv -R / cp -R → Move or copy folder including subfolders find . -name "geor...
  • Share folder (NFS and Samba) : NFS → Network File System Share folder NFS Server dnf install nfs-utils libnfsidmap systemctl enable rpcbind systemctl enable nfs-server ...
  • Computer Storage / Disk Partition : Computer Storage Local → RAM / HDD / SSD DAS (Direct Attached Storage) USB HDD / DVD SAN (Storage Area Network) through iSCSI cable or fiber ...
  • Logical Volume Management (LVM) : LVM (Logical Volume Management) Combine disk together by software Add new HDD on the fly to extend disk space Set LVM in Linux install Desired...


(97)
Filter untagged links
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community