LoginSignup
0
0

More than 3 years have passed since last update.

CentOS7のhttpdのオレオレ基本設定メモ

Last updated at Posted at 2020-05-02

Let's Encryptをインストール

httpdに適用

  • mod_sslが入ってなかったからインストール
# yum install mod_ssl

80番→443番にリダイレクト設定

  • conf.d/https_redirect.conf
<IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteCond %{SERVER_PORT} !^443$
       RewriteRule (.*) https://myhostmei.jp [L,R]
</IfModule>

httpd.confいろいろ

  • IPv4のみ/サーバ名設定(ワーニングログ抑止)
(略)
Listen 0.0.0.0:80
(略)
ServerName myhostmei.jp
(略)
  • .htaccessを有効にしたい
(略)
<Directory "/var/www/html">
(略)
    AllowOverride All
(略)
</Directory>
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