LoginSignup
0
0

More than 3 years have passed since last update.

webarenaでubuntu その13

Last updated at Posted at 2019-08-16

概要

webarenaでubuntu18.04やってみた。
apache2.4やってみた。
basic認証やってみた。

apache2.confの修正

<Directory /var/www/>
    Options -Indexes -FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

.htpasswd作成

sudo htpasswd -c /var/www/html/.htpasswd hoge

.htaccess作成

AuthType basic
AuthName "Auth"
AuthUserFile /var/www/html/.htpasswd
Require valid-user

パーミッション設定。

sudo chmod 604 .htaccess
sudo chmod 604 .htpasswd

以上。

0
0
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
0
0