Tag: apache2

Ubuntu: linux配置apache二级域名

配置 在Apache下配置二级域名,实际上就是配置一个VirtualHost,然后把ServerName进行一个重定向。 假如有httpd.conf文件(没有就是apache2.conf)文件,但是我的ubuntu在apache下/etc/apach2/有sites-available文件夹,这个下面有default.conf(000-default.conf)文件,这个里面添加上: <VirtualHost *:80> ServerAdmin info@ikeepstudying.com ServerName justcode.ikeepstudying.com DocumentRoot "/var… Read More

Ubuntu: 开启apache地址重写, rewrite, Enabling .htaccess file to rewrite path, .htaccess – URL rewriting not working, Rewrite rules not working

  sudo vi /etc/apache2/apache2.conf  (没有的话,可以尝试sudo vi /etc/apache2/sites-available/000-default.conf)打开apache配置文件 <Directory /var/www/>  #实际目录根据网站根目录而定     Options Indexes FollowSymLinks     AllowOverride None  #改为All     Require all granted </Directory>  执行命令:sudo a2enmod rewrite 在网站的根目录下建立… Read More