📑
Chris Johnson's KB
  • Chris Johnson's KB
  • Meta
    • Pages to Add
  • Cheat Sheets
    • Apache
    • Docker
    • Gatsby
    • Git
    • GraphQL
    • iOS
    • MySQL
    • Nginx
    • NextJS
    • NodeJS
    • Rails
    • React
    • Security Tools
    • Shell (Linux)
    • SwiftUI
    • Ubuntu Server
    • Vim
  • Computing
    • Mac
    • iOS
    • ChromeOS
    • Windows
    • Browser Plugins
    • RSI Prevention
    • Voice Control
    • AWS Cloud 9
    • Visual Studio Code
    • Linux
  • Workflows
    • Podcasting
    • Setting up a new Mac
    • Site Deploys
  • Hardware
    • Dell U2720Q Monitor
    • Moonlander Keyboard
    • Apple Silicon Macs
  • Productivity
    • Structure
    • Nuggets of Wisdom
  • Coffee
    • Coffee Notes & Equipment
    • Coffee Beans
    • AeroPress Recipes
    • V60 Recipes
    • Moka Pot Recipes
    • French Press Recipes
  • Gaming
    • Rocket League
  • Food
    • Cocktails
    • Favorite Recipes
    • Whisky Reviews
    • Infinity Bottle
    • Favorite Wines
  • Inspiration
    • Quotes
  • Philosophy
    • Life
    • Programming
  • Fitness
    • Diets
    • Exercise Notes
    • Personal Training Notes
Powered by GitBook
On this page

Was this helpful?

  1. Cheat Sheets

Apache

PreviousPages to AddNextDocker

Last updated 4 years ago

Was this helpful?

.

Enable site:sudo a2ensite SITENAME

Disable site:sudo a2dissite SITENAME

List apache modules:apache2ctl -M

Enable an apache2 module:sudo a2enmod MODULENAME

Disable an apache2 module:sudo a2dismod MODULENAME

Enable mod rewrite: sudo a2enmod rewrite

Reload server:service apache2 reload

Force reload the server:sudo /etc/init.d/apache2 force-reload

Apache file permissions:

chown -R www-data:www-data /folder/
chmod +r /folder

Virtual hosts directory: /etc/apache2/sites-available/

Virtual Host sample file:

<VirtualHost *:80>
  DocumentRoot /var/www/site
  ServerName site.example.com
  CustomLog /var/www/logs/site/access.log combined
  ErrorLog /var/www/logs/site/error.log
</VirtualHost>
Digital Ocean tutorial for Virtual Hosts