在wampserver集成环境下 远程部署项目并绑定域名(服务器为阿里云)
1.首先要明确3点:
1)CI框架中的base_url的意思:引用CI框架的使用手册
$config['base_url'] = ' http://ip地址:80/';
2) httpd.conf 的配置可以百度,但要注意ServerName和DocumentRoot 的配置,改为远程服务器的ip地址和项目在服务器中的项目路径。
3)配置httpd_vhosts.conf
# Virtual Hosts
#
<VirtualHost *:80>
ServerName www.xxxxx.com
DocumentRoot"C:/wamp64/www/项目名"
<Directory "C:/wamp64/www/项目名">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
4)还要记得配置阿里云的域名解析。