sudonginx-t&&sudoservicenginxreload
sudoapachectlconfigtest&&sudoservicehttpdreload# AL2023 / CentOS
sudoapache2ctlconfigtest&&sudoserviceapache2reload# Ubuntu
sudoa2ensitesite.conf;sudoa2dissite000-default.conf;sudoa2enmodrewriteproxyproxy_http
sudorestorecon-Rv/var/www;sudosetsebool-Phttpd_can_network_connect1# CentOS SELinux
sudonginx-T|grep-E"listen|server_name|root"# what Nginx really loaded
sudoapachectl-S# Apache vhosts + default (Ubuntu: apache2ctl -S)
sudoln-s/etc/nginx/sites-available/site/etc/nginx/sites-enabled/# Ubuntu Nginx enable site
sudosemanagefcontext-a-thttpd_sys_content_t"/srv/site(/.*)?";sudorestorecon-Rv/srv/site
sudosemanageport-a-thttp_port_t-ptcp8081# CentOS: allow a new web port
curl-H"Host: site1.example.com"http://localhost# test a vhost without DNS
awsec2allocate-address--domainvpc
awsec2associate-address--instance-idi-xxx--allocation-ideipalloc-xxx--allow-reassociation
awsec2release-address--allocation-ideipalloc-xxx
awsec2create-image--instance-idi-xxx--nameweb-v1# add --no-reboot only if you accept the risk
awsec2copy-image--source-regionap-south-1--source-image-idami-xxx--regionap-south-2--nameweb-v1-dr
awsec2deregister-image--image-idami-xxx;awsec2delete-snapshot--snapshot-idsnap-xxx
awsec2create-snapshot--volume-idvol-xxx--description"before-upgrade"
awsec2modify-instance-attribute--instance-idi-xxx--instance-type"{\"Value\": \"t3.small\"}"# instance stopped
nproc;free-h;lscpu# verify after resizing