Tag: Ubuntu2004/Apache
sudo apt install apache2
Listen 7777
ufw allow 7777/tcp
DocumentRoot /home/sora/public_html <Directory /home/sora/public_html> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>
HostnameLookups On
a2enmod rewrite
a2enmod auth_digest
sudo apt install certbot python3-certbot-apache
sudo certbot --apache
sudo ufw allow 443
sudo systemctl status certbot.timer
sudo certbot renew --dry-run
sudo certbot certificates
sudo certbot revoke --cert-name hoge.com
sudo systemctl restart apache2
sudo apt install libcurl4-openssl-dev apache2-dev libapr1-dev libaprutil1-dev
$ gem install passenger $ passenger-install-apache2-module
LoadModule passenger_module /home/sora/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/passenger-6.0.7/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /home/sora/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/passenger-6.0.7 PassengerDefaultRuby /home/sora/.rbenv/versions/2.6.6/bin/ruby </IfModule>
<VirtualHost *:80> ServerName www.yourhost.com # !!! Be sure to point DocumentRoot to 'public'! DocumentRoot /somewhere/public <Directory /somewhere/public> # This relaxes Apache security settings. AllowOverride all # MultiViews must be turned off. Options -MultiViews </Directory> </VirtualHost>