LoginSignup
11

More than 5 years have passed since last update.

ubuntuのapache2のドキュメントルート変更

Posted at
/etc/apache2/apache2.conf
163                                                                                                                                                                                                                                                                           
164 <Directory /var/www/>                                                                                                                                                                                                                                                     
165     Options Indexes FollowSymLinks                                                                                                                                                                                                                                        
166     AllowOverride None                                                                                                                                                                                                                                                    
167     Require all granted                                                                                                                                                                                                                                                   
168 </Directory>

を通したいパスへ変更する

/etc/apache2/apache2.conf
163                                                                                                                                                                                                                                                                           
164 <Directory /home/ubuntu/www>                                                                                                                                                                                                                                                     
165     Options Indexes FollowSymLinks                                                                                                                                                                                                                                        
166     AllowOverride None                                                                                                                                                                                                                                                    
167     Require all granted                                                                                                                                                                                                                                                   
168 </Directory>

apacheの再起動
sudo /etc/init.d/apache2 restart

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
11