Table of Contents
回复内容:
Home Backend Development PHP Tutorial 想通过局域网ip 来访问自己电脑的本地项目

想通过局域网ip 来访问自己电脑的本地项目

Jun 06, 2016 pm 08:20 PM
apache mysql php windows

apache已经配置好了,上个星期还可以用,这个星期访问不到了,不报错什么都没,一直加载到超时 各位大神求帮助

补充 本机可以访问 防火墙也关闭了

回复内容:

apache已经配置好了,上个星期还可以用,这个星期访问不到了,不报错什么都没,一直加载到超时 各位大神求帮助

补充 本机可以访问 防火墙也关闭了

如果本机可以访问,但是换台机器就不可以,应该是两台机器的网络原因。
1、确认两台机器是否都位于同一局域网,并且客户端可以ping 服务器成功
2、确认一下apache的配置中是否有只允许本地主机允许访问的配置,比如是否有Order 、Deny、Allow的限制等

找 NameVirtualHost ,看看 后面有没有 ip, 有的话 改成 *

补充:看看 所有的 apache 配置,找 127.0.0.1,有的话,改成 你的ip 或 *

同上, 补充: 可以用 # 号注释掉 Listen 的行, 比如
# Listen 127.0.0.1:80 # 这种写法就只允许本机访问
或者改成
Listen 0.0.0.0:80
这样可以允许来自所有ip的访问

查看下网关。

目测80端口被占用

如果apache无法启动,检查端口,端口未占用,检查安装是否正确,win10可能需要管理员权限安装apache。

如果本机可以访问,局域网无法访问,检查防火墙。

如果访问提示没有权限,检查hpptd.conf中的root访问权限。

这种情况一般就是IP地址变了,本机你通过localhost或127.0.0.1访问肯定没问题的.
局域网上星期还能访问如果没有调整网络,理论上应该也是正常能访问才对,那么很有可能本机的IP是通过DHCP获取的,经过一周时间,IP租期已到,本机IP已变化.
建议用ipconfig(windows系统)或ifconfig(Linux)查下本机IP,然后在局域网其他机器上检查访问的IP是否匹配.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

The page is blank after PHP is connected to MySQL. What is the reason for the invalid die() function? The page is blank after PHP is connected to MySQL. What is the reason for the invalid die() function? Apr 01, 2025 pm 03:03 PM

The page is blank after PHP connects to MySQL, and the reason why die() function fails. When learning the connection between PHP and MySQL database, you often encounter some confusing things...

How to efficiently integrate Node.js or Python services under LAMP architecture? How to efficiently integrate Node.js or Python services under LAMP architecture? Apr 01, 2025 pm 02:48 PM

Many website developers face the problem of integrating Node.js or Python services under the LAMP architecture: the existing LAMP (Linux Apache MySQL PHP) architecture website needs...

Explain late static binding in PHP (static::). Explain late static binding in PHP (static::). Apr 03, 2025 am 12:04 AM

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

How to avoid third-party interfaces returning 403 errors in Node environment? How to avoid third-party interfaces returning 403 errors in Node environment? Apr 01, 2025 pm 02:03 PM

How to avoid the third-party interface returning 403 error in the Node environment. When calling the third-party website interface using Node.js, you sometimes encounter the problem of returning 403 error. �...

How to share the same page on the PC and mobile side and handle cache issues? How to share the same page on the PC and mobile side and handle cache issues? Apr 01, 2025 pm 01:57 PM

How to share the same page on the PC and mobile side and handle cache issues? In the nginx php mysql environment built using the Baota background, how to make the PC side and...

How to monitor system performance through Debian logs How to monitor system performance through Debian logs Apr 02, 2025 am 08:00 AM

Mastering Debian system log monitoring is the key to efficient operation and maintenance. It can help you understand the system's operating conditions in a timely manner, quickly locate faults, and optimize system performance. This article will introduce several commonly used monitoring methods and tools. Monitoring system resources with the sysstat toolkit The sysstat toolkit provides a series of powerful command line tools for collecting, analyzing and reporting various system resource metrics, including CPU load, memory usage, disk I/O, network throughput, etc. The main tools include: sar: a comprehensive system resource statistics tool, covering CPU, memory, disk, network, etc. iostat: disk and CPU statistics. mpstat: Statistics of multi-core CPUs. pidsta

How to solve the problem of missing dynamic loading content when obtaining web page data? How to solve the problem of missing dynamic loading content when obtaining web page data? Apr 01, 2025 pm 11:24 PM

Problems and solutions encountered when using the requests library to crawl web page data. When using the requests library to obtain web page data, you sometimes encounter the...

When using Django and MySQL to process hundreds of thousands to one or two million pieces of data, what kind of cache solution should a 4-core 8G memory server choose? When using Django and MySQL to process hundreds of thousands to one or two million pieces of data, what kind of cache solution should a 4-core 8G memory server choose? Apr 01, 2025 pm 11:36 PM

Using Django and MySQL to process large data volumes When using Django and MySQL databases, if your data volume reaches hundreds of thousands to one or two million...

See all articles