简体   繁体   中英

Apache Port 8080 Windows XP

I've installed Apache 2.2. Accepted defaults.

I've created a simple php file calling it index.php.

If I enter this in Firefox: http://localhost:8080/

I get the splash screen:

If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page.

http://localhost:8080/manual/

Gets me to the help screen.

I created a new projectd in NetBean 6.5.1. I pointed directory of the project to:

C:\\Program Files\\Apache Group\\Apache2\\htdocs\\Apache

Project/Source Directories: C:\\Program Files\\Apache Group\\Apache2\\htdocs

Project URL: http://localhost:8080/htdocs/

I created a simple index.php file with echo("test")

Not Found

The requested URL /htdocs/index.php was not found on this server. Apache/2.0.63 (Win32) Server at localhost Port 8080

The URL is just http://localhost:8080/index.php

You don't need the htdocs directory in there.

通常,“ htdocs”目录是您的页面的发布来源,因此我希望该URL为http:// localhost:8080 / index.php,而不是在URL中也包含/ htdocs。

By default, your web root is "htdocs". Whenever you go to " http://localhost:8080 ", it looks for any paths/files you specify inside the htdocs directory, so you don't have to manually add it to your URL.

I would suggest uninstalling the current Apache install, and installing WAMP instead. It gives you Apache with PHP installed, and MySQL for more advanced web applications. It is also all contained within "C:\\wamp", so all your binaries can be found in one place.

Sounds like your problem is just the url you were trying. Although, if you're looking for a simpler way, packages like XAMPP can make it really easy to set up a functioning server for development.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM