简体   繁体   English

无法访问Apache上的index.html?

[英]Don't have access to index.html on apache?

I'm running Apache/2.2.15 (Red Hat) Server (I think). 我正在运行Apache / 2.2.15(红帽)服务器(我认为)。 When I ssh in and run grep apache, there's no output. 当我ssh并运行grep apache时,没有输出。 But...another file (index.php, read below) on the same machine/ip/directory is showing. 但是...显示了同一台机器/ ip /目录上的另一个文件(index.php,如下所示)。

I'm actually taking over for someone. 我实际上是要接管某人。 Site/pages are kept at /var/www/html. 网站/页面保存在/ var / www / html。 In that directory there are index.php and index.html. 在该目录中有index.php和index.html。 I was able to reach both. 我能够达到两者。

I changed index.html to welcome page and uploaded and replaced the old one. 我将index.html更改为欢迎页面,并上传并替换了旧的页面。 When attempting to reach index.html from another computer, I recieve the following: 当尝试从另一台计算机访问index.html时,我收到以下信息:

Forbidden

You don't have permission to access /index.html on this server.

But I can still reach index.php in the same directory. 但是我仍然可以在同一目录中访问index.php。 In case it matters, I used 'cp' copy index.html from another directory into /var/www/html. 万一重要,我使用了“ cp”将index.html从另一个目录复制到/ var / www / html。

I'm pretty new to this. 我对此很陌生。 Can someone clue me in? 有人可以告诉我吗? Thanks! 谢谢!

Not sure what the problem was but... 不知道是什么问题,但是...

When I used a text editor besides text wrangler, it worked. 当我使用文本编辑器之外的文本编辑器时,它可以工作。

When I created all the folders on the server and moved the files to the folders individually, it worked. 当我在服务器上创建所有文件夹并将文件分别移动到这些文件夹时,它可以工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Laravel 403 Forbidden:您无权在生产环境中访问此服务器上的/index.html - Laravel 403 Forbidden: You don't have permission to access /index.html on this server in production Index.php代替Index.html,如何访问,我显然必须更改的.htaccess文件在哪里? - Index.php instead Index.html, how to access, and where is the .htaccess file that i have apparently have to change? 当我无权访问HTML时,在if语句中添加CSS - Add css in an if statement when I don't have access to the HTML Laravel:访问<body>来自仪表板的 index.html - Laravel: access the <body> of index.html from dashboard 如何通过Wamp localhost访问index.html? - How to access index.html through Wamp localhost? 无法通过 MAMP 访问 index.html 页面 - can not access index.html page through MAMP 阻止直接访问php脚本,但允许index.html - Prevent direct access to php script but allow from index.html CentOS + Apache:您无权访问此服务器上的/info.php - CentOS + Apache: You don't have permission to access /info.php on this server 运行Docker PHP-apache:禁止您无权访问此服务器上的/ - Run Docker PHP-apache: Forbidden You don't have permission to access / on this server 您无权在Apache PHP中访问/marcon/assets/images/pic.jpg - You don't have permission to access /marcon/assets/images/pic.jpg in apache php
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM