国产成人精品久久免费动漫-国产成人精品天堂-国产成人精品区在线观看-国产成人精品日本-a级毛片无码免费真人-a级毛片毛片免费观看久潮喷

您的位置:首頁技術文章
文章詳情頁

Apache alias虛擬目錄設置問題

瀏覽:89日期:2024-06-29 18:16:34

問題描述

apache 設置虛擬目錄,進入到了index.html頁面,但是無法訪問到網頁內容中引用了別的文件夾的內容,包括css,js,圖片等文件;

apache版本:httpd-tools-2.2.15-47.el6.centos.4.i686

httpd -M :...actions_module (static)alias_module (static)rewrite_module (static)...httpd.conf:<IfModule alias_module> # # Redirect: Allows you to tell clients about documents that used to # exist in your server’s namespace, but do not anymore. The client # will make a new request for the document at its new location. # Example: # Redirect permanent /foo http://www.example.com/bar # # Alias: Maps web paths into filesystem paths and is used to # access content that does not live under the DocumentRoot. # Example: # Alias /webpath /full/filesystem/path # Alias /zh '/data/wwwroot/zh' <Directory '/data/wwwroot/zh'>Options Indexes FollowSymLinksAllowOverride NoneOrder allow,denyAllow from all </Directory> # If you include a trailing / on /webpath then the server will # require it to be present in the URL. You will also likely # need to provide a <Directory> section to allow access to # the filesystem path. # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing '/' apply to ScriptAlias # directives as to Alias. # ScriptAlias /cgi-bin/ '/usr/local/apache/cgi-bin/'</IfModule>index.html<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /><title>Miaos’ Photos</title><style>*{margin:0px; padding:0px; }#main{position:relative; }.box{padding:15px 0px 0px 15px; float:left; }.pic{padding:10px; border:1px solid #ccc; border-radius:5px; box-shadow:0 0 8px #ccc;}.pic img{width:195px;; height:auto}</style><script type='text/javascript' src='http://www.cgvv.com.cn/wenda/script.js'></script></head><body> <p id='main'> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/1.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/2.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/3.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/4.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/5.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/6.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/7.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/8.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/9.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/10.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/11.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/12.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/13.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/1.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/2.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/3.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/4.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/5.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/6.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/7.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/8.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/9.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/10.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/11.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/12.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.cgvv.com.cn/wenda/images/13.jpeg'/> </p> </p> </p></body></html>

網頁訪問結果:

Apache alias虛擬目錄設置問題

能進入到虛擬目錄中的index.html文件,但是里面的圖片全都無法訪問,js效果也沒有。目錄設置的都是相對目錄,同樣的配置在另一臺虛擬機中可以完美訪問

求教各位熟悉apache的前輩,這是怎么回事!

問題解答

回答1:

你f12看一下那些圖片,js引用的路徑實際是什么

回答2:

重裝apache可以解決;原來的apache是用網上的一個LAMP,yum安裝的,應該有點問題。。。。。。

相關文章:
主站蜘蛛池模板: 91最新网站 | 国产v精品成人免费视频400条 | 国产高清晰在线播放 | 日本高清视频免费在线观看 | 成年男人午夜片免费观看 | 看v片 | 性欧美久久 | 久久青草视频 | 51国产偷自视频区视频手机播器 | 国产aaa级一级毛片 国产aaa毛片 | 一级网站片 | 亚洲成人黄色网 | 欧美成人网7777视频 | 国产不卡在线播放 | 久久国产免费一区 | 欧美一区二区三区精品 | 欧美一级毛片图 | 久久精品视频免费播放 | 欧美午夜视频在线 | 国产精品亚洲一区二区三区在线观看 | 欧美日本俄罗斯一级毛片 | 久久久久久久99久久久毒国产 | 日本在线观看免费视频网址 | 久久99精品这里精品3 | 岛国毛片在线观看 | 日韩免费一级毛片 | 国内国语一级毛片在线视频 | 久久午夜影视 | 国产一区二区三区手机在线观看 | 久久99精品久久只有精品 | 88精品视频| 日韩欧美一区二区精品久久 | 99久热在线精品视频播 | 国产大尺度福利视频在线观看 | 中文字幕水野优香在线网在线 | 欧美国产综合日韩一区二区 | 日本久久综合网 | 亚洲一区国产 | 亚洲精品视频在线观看视频 | 成人黄色在线观看 | 国产精品视频免费 |