配置Apache和laravel
使用vim编辑配置文件
vim /etc/httpd/conf/httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so
- 把AllowOverride None改成AllowOverride All
- 配置虚拟主机,把下面这段加在/etc/httpd/conf/httpd.conf最后面,注意去掉注释
<VirtualHost *:80>
ServerAdmin suibian@sina.com //随便哪个邮箱
DocumentRoot "/var/www/html/laravel5.2/public" //项目的访问路径
ServerName www.aliyun.com //域名,绑定这台服务器的IP
DirectoryIndex index.php index.html index.htm //访问网站时默认打开的文件
ErrorLog "logs/www.aliyun.com-error_log" //日志
CustomLog "logs/www.aliyun.com-access_log" common //日志
</VirtualHost>
本文标题:配置Apache和laravel
本文链接:https://www.haomeiwen.com/subject/mwnehftx.html
网友评论