~网站发布不能访问的问题,大神~
我买了一个空间,然后把网站在空间里发布了,用的是apache+mysql。现在的问题是,我用127.0.0.1和localhost都能访问,但是外网就访问不了(直接用IP访问的)。
我设置了httpd里面的allow from all,把 deny from all也删掉了的,listen也设置了的,防火墙也关了的,但是还是访问不了!
网页直接打不开,也没有“Forbidden You don't have permission to access / on this server.”的提示。。
但是用其他电脑ping空间的IP又能通~~
现在不知道是哪里出了问题了,求助大神~~
回复讨论(解决方案)
请给出域名!
请给出域名!
域名还在备案,我直接用IP访问的。 IP是:121.12.175.19.
很慢,?法?接
Google Chrome could not load the webpage because 121.12.175.19 took too long to respond. The website may be down, or you may be experiencing issues with your Internet connection.
traceroute to 121.12.175.19 (121.12.175.19), 64 hops max, 52 byte packets 1 bogon (192.168.102.1) 1.928 ms 1.064 ms 1.557 ms 2 bogon (192.168.3.251) 0.893 ms 1.096 ms 1.290 ms 3 221.4.48.98 (221.3.48.98) 3.593 ms 8.879 ms 3.404 ms 4 120.80.173.73 (120.81.173.73) 8.358 ms 6.049 ms 120.80.173.69 (120.81.173.69) 3.562 ms 5 120.84.0.49 (120.84.0.49) 3.238 ms 3.240 ms 120.83.0.89 (120.83.0.89) 7.432 ms 6 219.158.14.241 (219.158.14.241) 4.793 ms 5.700 ms 219.158.19.9 (219.158.19.9) 3.718 ms 7 219.158.15.230 (219.158.15.230) 4.028 ms 4.554 ms 219.158.22.138 (219.158.22.138) 4.507 ms 8 202.97.15.169 (202.97.15.169) 7.733 ms 5.502 ms 7.867 ms 9 202.97.63.85 (202.97.63.85) 6.789 ms 5.671 ms 8.205 ms10 183.61.221.105 (183.61.221.105) 4.051 ms 4.543 ms 4.620 ms11 183.59.13.222 (183.59.13.222) 12.053 ms 10.832 ms 9.027 ms12 183.60.128.178 (183.60.128.178) 7.896 ms 12.108 ms 7.790 ms13 113.105.160.174 (113.105.160.174) 9.567 ms 11.880 ms 11.964 ms14 * * *15 121.12.175.19 (121.12.175.19) 8.581 ms 41.236 ms 47.295 ms
ping是很快,但???面很慢,可以??放一????面看看。
print_r(get_headers('http://121.12.175.19'));
Array( [0] => HTTP/1.1 200 OK [1] => Date: Thu, 02 Apr 2015 02:53:44 GMT [2] => Server: Apache/2.2.21 (Win32) PHP/5.3.10 [3] => X-Powered-By: Ftxia 6.0 [4] => Set-Cookie: PHPSESSID=q90d1eae6c799rc3srg02c0da0; path=/ [5] => Expires: Thu, 19 Nov 1981 08:52:00 GMT [6] => Cache-Control: private [7] => Pragma: no-cache [8] => Connection: close [9] => Content-Type: text/html; charset=utf-8)
是否你指定了来源?
echo file_get_contents('http://121.12.175.19');
<!doctype html><html class="0663ec-pc w1200"><head><title> 左航网</title><meta name="keywords" content="" /><meta name="description" content="" /><meta name="generator" content="0663ec" /><meta name="renderer" content="webkit"><meta name="version" content="2015-1-1 0663.ec"><meta name="MSSmartTagsPreventParsing" content="True" /><meta http-equiv="MSThemeCompatible" content="Yes" /><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">........
echo file_get_contents('http://121.12.175.19');
<!doctype html><html class="0663ec-pc w1200"><head><title> 左航网</title><meta name="keywords" content="" /><meta name="description" content="" /><meta name="generator" content="0663ec" /><meta name="renderer" content="webkit"><meta name="version" content="2015-1-1 0663.ec"><meta name="MSSmartTagsPreventParsing" content="True" /><meta http-equiv="MSThemeCompatible" content="Yes" /><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">........
echo file_get_contents('http://121.12.175.19');
<!doctype html><html class="0663ec-pc w1200"><head><title> 左航网</title><meta name="keywords" content="" /><meta name="description" content="" /><meta name="generator" content="0663ec" /><meta name="renderer" content="webkit"><meta name="version" content="2015-1-1 0663.ec"><meta name="MSSmartTagsPreventParsing" content="True" /><meta http-equiv="MSThemeCompatible" content="Yes" /><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">........
ping是很快,但???面很慢,可以??放一????面看看。
试过放静态页面了,也是一样的
比?奇怪,file_get_contents可以?取到,用curl和??器不行。
66665: SOCKET
121.12.175.19:80
Start Time: 2015-04-02 11:42:19.225
t=189357 [st= 0] +SOCKET_ALIVE [dt=17977]
--> source_dependency = 66662 (CONNECT_JOB)
t=189357 [st= 0] +TCP_CONNECT [dt=11]
--> address_list = ["121.12.175.19:80"]
t=189357 [st= 0] TCP_CONNECT_ATTEMPT [dt=11]
--> address = "121.12.175.19:80"
t=189368 [st= 11] -TCP_CONNECT
--> source_address = "192.168.101.217:54525"
t=189368 [st= 11] +SOCKET_IN_USE [dt=17966]
--> source_dependency = 66678 (HTTP_STREAM_JOB)
t=189368 [st= 11] SOCKET_BYTES_SENT
--> byte_count = 437
t=207334 [st=17977] SOCKET_READ_ERROR
--> net_error = -7 (ERR_TIMED_OUT)
--> os_error = 60
t=207334 [st=17977] -SOCKET_IN_USE
t=207334 [st=17977] -SOCKET_ALIVE
是你的不就对了吗?
能访问还不行吗?
用程序能抓取到,但用浏览器打不开。
显然你的网站中的 js 有问题
是你的不就对了吗?
能访问还不行吗?
用程序能抓取到,但用浏览器打不开。
显然你的网站中的 js 有问题
不是的,使用curl也不行。另外,如果是js??,
view-source:http://121.12.175.19/
??就不??用js了,也不能??。
是你的不就对了吗?
能访问还不行吗?
用程序能抓取到,但用浏览器打不开。
显然你的网站中的 js 有问题
但是为什么我本地用浏览器能打开呀,而且我把网站换成静态页面,用浏览器也不能打开呢。应该不是JS的问题吧
只能理解为 防火墙挡住了
只能理解为 防火墙挡住了
防火墙关了的
你把主页改了吗?
112233
你把主页改了吗?
112233
可是用浏览器还是访问不了,用file_get_contents又能获取到,我的系统是win2003的。
用域名吧!应该可以的
用域名吧!应该可以的
试过了,用域名也不行的。。 域名是:www.jmsugou.comping域名也是通的
Order deny,allow
Allow from all
Order deny,allow
Allow from all
用 file_get_contents 能抓取到,就表示网站设置并没有问题
所以请不要在apache 的配置上找原因
Order deny,allow
Allow from all
如果是通过路由器或者交换机什么的!需要做一下ip映射!
Order deny,allow
Allow from all
如果是通过路由器或者交换机什么的!需要做一下ip映射! 独立IP,没路由器,不用做映射的呀
用 file_get_contents 能抓取到,就表示网站设置并没有问题
所以请不要在apache 的配置上找原因
最好贴出httpd.conf中的directory那几段
?不?限制了user-agent?
为神哦咧,这个问题
?主解?了??
?主解?了??
后来换了wamp2.4的版本,配置好后,能访问了。但是新问题又来了,apache启动几分钟之后,就访问不了,必须重启后才能访问,过几分钟又访问不了。我看错误日志,提示指定的网络名不再可用,然后我关掉了AcceptEx,就没这个错误了,但是还是访问不了。而且错误日志和访问日志都没记录了。
1.文件目录权限
2.服务器设置
3.如果是使用gii生成东西 的话,有ip限制
是权限设置的问题…把网站文件夹设为744?
搞不定了,我把aphche换成了IIS,现在正常了。感谢大家的热情帮助,现在结贴!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP is suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.
