1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Stretch apache2

Last updated at Posted at 2020-08-25

sudo apt-get install -y ntp

まずはインストール
sudo apt-get install apache2

aliasの方法は次の通り

sudo vi /etc/apache2/mods-enabled/alias.conf


        Alias /www/ "/mnt/root/www/"

        
         AllowOverride All
         Options +ExecCGI +Includes +Indexes
         Require all granted
        

sudo systemctl restart apache2

sudo vi /etc/apache2/conf-available/serve-cgi-bin.conf

このなかにあるcgiパスを変更する


 
         ScriptAlias /cgi-bin/ /mnt/root/www/cgi-bin/
         
                 AllowOverride None
                 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch +Includes
                 Require all granted
         
 

sudo a2enconf serve-cgi-bin.conf
sudo a2disconf serve-cgi-bin.conf
sudo a2enmod cgid

cgi, ssiが有効となる拡張子の指定

sudo vi /etc/apache2/mods-enabled/mime.conf

コメント解除し、CGIとして扱う拡張子を設定
AddHandler cgi-script .cgi .pl ← この行のコメントアウトを外し有効化する

また、
sudo vi /etc/apache2/apache2.conf
にて

AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted

をアクセス許可が必要。

デフォルトで検索されるファイル名の設定
sudo vi /etc/apache2/mods-enabled/dir.conf

sudo a2enmod include cgid
sudo a2dissite *
sudo a2ensite *
sudo systemctl restart apache2

sudo vi /etc/apache2/mods-available/mime.conf
sudo vi /etc/apache2/mods-available/dir.conf
sudo vi /etc/apache2/conf-available/serve-cgi-bin.conf

ipv6対応

sudo vi /etc/modprobe.d/ipv6.conf


# Don't load ipv6 by default -> loading
# alias net-pf-10 off                  #コメントアウト
# alias ipv6 off

あとは、DNSを更新すればOK

wget -O - 'http://[MasterID]:[Password]@www.mydns.jp/login.html'

ipv6 ready

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?