微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

访问网站 localhost/website/ 时出现错误“在此服务器上找不到请求的 URL”

如何解决访问网站 localhost/website/ 时出现错误“在此服务器上找不到请求的 URL”

•   I was working on a website I had setup on localhost.
•   I was using XAMPP to manage the servers,im using MysqLDatabase and Apache Web Server.
•   The environment is Unix environment.
•   **Problem statement** - After following below steps which are also listed on this link (https://websitebeaver.com/set-up-localhost-on-macos-high-sierra-apache-MysqL-and-PHP-7-with-sslhttps) I am unable to access my website. It is giving me an error “The requested URL was not found on this server”

以下是我按照此链接所做的导致问题(https://websitebeaver.com/set-up-localhost-on-macos-high-sierra-apache-mysql-and-php-7-with-sslhttps)的操作:

•   Turned PHP7 on via terminal.
•   Created ‘Sites’ folder in HOME directory.
•   Created a file names index.PHP which had following code:<?PHP echo "Hello From Sites Folder!";PHPinfo();?>
•   Opened up terminal and entered sudo nano /etc/apache2/httpd.conf 
•   Replaced both occurrences of /Library/WebServer/Documents with /Users/nerd/Sites (Note- nerd is my home directory)
•   Restarted apache server and installed MysqL
•   Opened terminal and typed Type ALTER USER 'root'@'localhost' IDENTIFIED BY 'newpassword';
•   Then I downloaded sequelpro and was getting some error so I stopped there and thought of dropping the iidea of setup of localhost on Mac(apache,MysqL,and PHP7 with SSL and HTTPS
•   Now when Im trying to open my website on local host which was working earlier before I took above steps it did not let me access and gave me an error which is “The requested URL was not found on this server”

注意:我按照此链接中建议的步骤操作,并按照步骤操作直到下载 sequelpro,然后我停止了 (https://websitebeaver.com/set-up-localhost-on-macos-high-sierra-apache-mysql-and-php-7-with-sslhttps)。

以下是我试图解决的问题:

•   Uninstalled MysqL and sequelpro
•   Replaced both occurrences of /Users/nerd/Sites with  /Library/WebServer/Documents (Note- nerd is my home directory)
•   Shutdown apache server and restarted after which apache and sql server is running from xampp but website is not accessible
•   I have tried using port numbers 8080 and 80 in apache configuration but both are not working.
•   I also tried putting port number as 81 in apache but it prompts me to retype the port number again and again,it does not accept port number 81.
•   Below is the port numbers which my ip listens to -
听8080 听 80

我正在积极回复这个问题的询问。 任何帮助将不胜感激。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。