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
  • 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...
  • System information, root recovery, environment variables, shortcuts : Finding System Information cat /etc/redhat-release → Red Hat version uname -a → Linux hostname, kernel, architecture dmidecode → hardware, BIOS, syst...
  • Journalctl : journalctl journalctl -u sshd show only log for sshd logger hello write in syslog journalctl -f log is live nano /etc/systemd/journald.c...
  • Linux File Ownership, ACLs, and I/O Redirects : File Ownership chown → Change ownership chgrp → Change group Access Control List (ACL) setfacl → Set file ACL getfacl → Get file ACL Add Permissi...
  • Package Management : System Updates & Software Install dnf (yum) → RedHat → /etc/yum.repos.d apt-get → Debian rpm → RedHat package management standalone package to ...


(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