这是我的主机文件,我在其中进行了一些更改
#127.0.0.1 localhost
192.168.51.75 cryptologic.com
尽管如此,我的网站可以通过上述IP地址访问,但不能使用domain_name
您是否在wamp服务器中配置了虚拟主机?
如果没有,请点击此链接:http://www.virendrachandak.com/techtalk/creating-multiple-virtual-websites-in-wampserver/
假设这是Apache,在您的Apache目录中,您会发现一个conf/extra文件夹,其中有一个名为httpd-vhosts.conf的文件。您需要在那里创建一个虚拟主机
<VirtualHost 192.168.51.75>
DocumentRoot "//whereever/path/your/root/is"
Servername cryptologic.com
</VirtualHost>
之后,重新启动Apache,您就可以开始了!
在apache设置的httpd-vhosts.conf中可能需要这样的东西
<VirtualHost *:80>
DocumentRoot "C:'xampp'htdocs'thefolderyouneed"
ServerName "cryptologic.com"
ServerAlias "*.cryptologic.com"
<Directory "C:'xampp'htdocs'thefolderyouneed">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>