-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux Web Servers
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to web servers on Linux, covering Arch Linux, CachyOS, and other distributions including Apache, Nginx, and web server configuration.
Install Apache:
# Arch/CachyOS
sudo pacman -S apache
# Enable service
sudo systemctl enable --now httpd.service
# Check status
systemctl status httpdDebian/Ubuntu:
sudo apt install apache2Fedora:
sudo dnf install httpdConfigure Apache:
# Edit config
sudo vim /etc/httpd/conf/httpd.conf
# Edit virtual hosts
sudo vim /etc/httpd/conf/extra/httpd-vhosts.confTest server:
# Check if running
curl http://localhost
# Or open browser
# http://localhostInstall Nginx:
# Arch/CachyOS
sudo pacman -S nginx
# Enable service
sudo systemctl enable --now nginx.service
# Check status
systemctl status nginxDebian/Ubuntu:
sudo apt install nginxFedora:
sudo dnf install nginxConfigure Nginx:
# Edit config
sudo vim /etc/nginx/nginx.conf
# Edit sites
sudo vim /etc/nginx/sites-available/defaultApache:
# Create virtual host
sudo vim /etc/httpd/conf/extra/httpd-vhosts.confNginx:
# Create server block
sudo vim /etc/nginx/sites-available/example.comCheck logs:
# Apache logs
journalctl -u httpd
# Nginx logs
journalctl -u nginxThis guide covered web servers for Arch Linux, CachyOS, and other distributions, including Apache and Nginx.
- Networking - Network setup
- Security Configuration - Security
- ArchWiki Apache: https://wiki.archlinux.org/title/Apache_HTTP_Server
- ArchWiki Nginx: https://wiki.archlinux.org/title/Nginx
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.