运行apache显示错误: Syntax error on line 160 of c:/myphpweb/apache/c Invalid command 'BindAddress=192.168.0.4', perha odule not included in the server configuration
我知道了~不过我的网站用到了虚拟域名、虚拟路径这个技术,在httpd.conf中有如下一段新加的内容用来解析域名的: # tyj User site <VirtualHost my.tyj.intranet> <Directory c:/MyPhpWeb/apache/htdocs/tyj.agebiz.com> Options FollowSymLinks Indexes ExecCGI AllowOverride None </Directory> RewriteEngine On #RewriteLog rewrite_user.log #RewriteLogLevel 9 RewriteRule ^/stats/store/(.*).gif$ /ezstats/user/storestats.php [S=3] RewriteRule .*/ezmediacatalogue/catalogue/(.*)$ /var/www/publish/ezmediacatalogue/catalogue/$1 [T="application/oct-stream",S=2] # The lines above should appear on the same line in your configuration file! RewriteRule ^/filemanager/filedownload/([^/]+)/(.*)$ /ezfilemanager/files/$1 [T="application/oct-stream",S=1] # The lines above should appear on the same line in your configuration file! RewriteRule !\.(gif|css|jpg|png|js)$ /index.php DocumentRoot c:/MyPhpWeb/apache/htdocs/tyj.agebiz.com ServerName my.tyj.intranet </VirtualHost>所以我必须在浏览器中输入my.tyj.intranet才能正常运行我的网站, 而如你们所说在其他机器上输入http://192.168.0.2/my.tyj.intranet就显示无此主页~~~~~如果在根目录下放入index.php则输入http://192.168.0.2/index.php时显示正常我想关键就是由于我在配置文件中修改了VirtualHost的原因~~~~~`那么谁又有办法使其他用户能正常访问我的网站呢??
Syntax error on line 160 of c:/myphpweb/apache/c
Invalid command 'BindAddress=192.168.0.4', perha
odule not included in the server configuration
#bindaddress
一、本机不作改动,局域网机访问你机子时要设置代理,代理地址为你机子的IP,端口为80二、改动httpd.conf#Listen 12.34.56.78:80 改为Listen 你机子IP:80
#BindAddress * 改为BinaAddress 你机子IP
按你的方法改后启动apache后又自动跳出apache~~~~~
别人用你的IP直接访问:
http://192.168.0.2/index.php
比如你的ip是218.193.252.22
那么人就用以下地址就可以了。
http://218.193.252.22
当然,你用iis也可以的,我就是用iis,apache也可以的!祝你好运!
# tyj User site
<VirtualHost my.tyj.intranet>
<Directory c:/MyPhpWeb/apache/htdocs/tyj.agebiz.com>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
</Directory>
RewriteEngine On
#RewriteLog rewrite_user.log
#RewriteLogLevel 9
RewriteRule ^/stats/store/(.*).gif$ /ezstats/user/storestats.php [S=3]
RewriteRule .*/ezmediacatalogue/catalogue/(.*)$ /var/www/publish/ezmediacatalogue/catalogue/$1 [T="application/oct-stream",S=2]
# The lines above should appear on the same line in your configuration file!
RewriteRule ^/filemanager/filedownload/([^/]+)/(.*)$ /ezfilemanager/files/$1 [T="application/oct-stream",S=1]
# The lines above should appear on the same line in your configuration file!
RewriteRule !\.(gif|css|jpg|png|js)$ /index.php
DocumentRoot c:/MyPhpWeb/apache/htdocs/tyj.agebiz.com
ServerName my.tyj.intranet
</VirtualHost>所以我必须在浏览器中输入my.tyj.intranet才能正常运行我的网站,
而如你们所说在其他机器上输入http://192.168.0.2/my.tyj.intranet就显示无此主页~~~~~如果在根目录下放入index.php则输入http://192.168.0.2/index.php时显示正常我想关键就是由于我在配置文件中修改了VirtualHost的原因~~~~~`那么谁又有办法使其他用户能正常访问我的网站呢??
2、其它机子的DNS解析填上你机器的IP,就可以用域名访问你的机子你所说的"启动apache后又自动跳出apache~~~~~"----指的是什么,当你点击“开始”--“程序”--“apache http server"--"control apache server"--"restart"后,出现一个apache运行的界面,之后这个界面就消失了,这是正常现象,只要在“管理工具”--“服务”--”apache“显示已启动表示正常了