1.按照以下路径找到相应的配置文件,并且进行更改
2.修改phpstudy里面的文件(nginx)
2、apache
windows 修改windows的host文件 通过phpstudy建立站点
<VirtualHost *:80>
DocumentRoot "D:\phpStudy\WWW"
ServerName 123.COM
ServerAlias
<Directory "D:\phpStudy\WWW">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
linux:(debain)
验证码用php7.0-gd 提示缺少pdo驱动php7.0-mysql(sqlite)
1、修改
修改/etc/hosts 文件添加
2、在当前目录下创建.conf文件 名字任意:
例如0bug.con 默认文件不用管
0bug.conf内容如下:
<VirtualHost *:80>
ServerName jiwozzz.com
#ServerAlias www.jiwo.org
AddDefaultCharset UTF-8
DocumentRoot /var/www/html/zzz
<Directory /var/www/html/zzz>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
完毕之后,在一下目录创建0bug.cof的软连接
创建软连接的时候,最好用绝对路径
重启apapche后即可。
关于sites-enabled 和sites-available 自行百度
如果局域网访问记得修改windows的hosts文件