简体   繁体   English

php5文件(在aws亚马逊ec2 suse上运行apache2)子目录似乎被阻止

[英]php5 files (with apache2 running on aws amazon ec2 suse) subdirectories seems to be blocked

I have a problem with an Aws Amazon-EC2 SuSe instance, installed apache2, php5, mysql and everything needed to run a web application, we're able to see simple .html or .php pages, but when we try to view more "elaborated" pages with "incredibly complicated code" (excuse the sarcasm) like this 我遇到了Aws Amazon-EC2 SuSe实例的问题,安装了apache2,php5,mysql以及运行Web应用程序所需的所有内容,我们能够看到简单的.html或.php页面,但是当我们尝试查看更多页面时,像这样用“非常复杂的代码”(请讽刺)精心制作的“页面”

<link href="css/XXXX.css" rel="stylesheet" type="text/css">

or 要么

<div style="background-image:url(img/XXXXX.png);>

or 要么

<?php include('inc/XXXX.php'); ?>

or 要么

<script type="text/javascript" src="js/XXXXX.js"></script>

or any other code (html, php, js, whatever) that points to a subdirectory (css,js,inc,img and so on) doesn't work (all response it's a nice blank page without any error messages like 404 or 403), if i move any necessary file to the root directory seems to work fine, and of course I'm not going to maintain a site with more than 3000 files at root. 或指向子目录(css,js,inc,img等)的任何其他代码(html,php,js等)不起作用(所有响应都是空白页面,没有404或403等错误消息) ),如果我将任何必要的文件移至根目录似乎都可以正常工作,那么我当然不会维护一个根目录下包含3000个以上文件的站点。

Not sure if I'm missing any configuration at SuSe, Apache or PHP .conf files but already googled this question but i can't find anything (maybe I'm a little stressed with this and do not see the answer) to solve this to be able to maintain a "normal" directory structure, somebody can help me? 不知道我是否在SuSe,Apache或PHP .conf文件中缺少任何配置,但是已经在Google上搜索了此问题,但是我找不到任何东西(也许对此有点压力,看不到答案)来解决此问题为了能够维持“正常”目录结构,有人可以帮助我吗? thnxs a lot in advance. 提前很多。

可能您在虚拟主机的根目录中有一个.htaccess文件,这就是导致此问题的原因!

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

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