亚洲精品久久久中文字幕-亚洲精品久久片久久-亚洲精品久久青草-亚洲精品久久婷婷爱久久婷婷-亚洲精品久久午夜香蕉

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

Apache alias虛擬目錄設置問題

瀏覽:70日期: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.aoyou183.cn/wenda/script.js'></script></head><body> <p id='main'> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/1.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/2.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/3.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/4.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/5.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/6.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/7.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/8.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/9.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/10.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/11.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/12.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/13.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/1.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/2.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/3.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/4.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/5.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/6.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/7.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/8.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/9.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/10.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/11.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/12.jpeg'/> </p> </p> <p class='box'> <p class='pic'> <img src='http://www.aoyou183.cn/wenda/images/13.jpeg'/> </p> </p> </p></body></html>

網頁訪問結果:

Apache alias虛擬目錄設置問題

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

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

問題解答

回答1:

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

回答2:

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

相關文章:
主站蜘蛛池模板: 一级毛片一级毛片免费毛片 | 国产a久久精品一区二区三区 | 日本免费乱人伦在线观看 | 91真人毛片一级在线播放 | 黄色毛片免费在线观看 | 黄色在线免费观看视频 | 亚洲人与牲动交xxxxbbbb | 日韩不卡视频在线 | 97免费在线视频 | 911精品国产亚洲日本美国韩国 | 一级毛片日韩a欧美 | 日本特交大片免费观看 | 路线1路线二线路三国产 | 免费的日本一级淫篇小说 | 黄片1234| 亚洲s码 | 亚洲综合国产一区在线 | 亚洲精品ai换脸一区二区三区 | 国产精品999在线 | 精品国产香蕉伊思人在线又爽又黄 | 在线观看欧美一区 | 国产a国产片国产 | 一级做a爱免费观看视频 | 精品免费视在线视频观看 | 操比视频网站 | 青草视频在线 | 亚洲国产精品一区二区首页 | 91麻豆国产在线观看 | 国产精品视频免费一区二区三区 | 黄色短片免费看 | 国产精品乱码在线观看 | 中文字幕日韩欧美一区二区三区 | 欧美二级在线观看免费 | 日产国产欧美韩国在线 | 国产三级观看 | 手机看片一区 | 国产婷婷| 一区二区在线视频 | 东京不太热在线视频免费 | 久久香蕉国产线看观看网站 | 日本欧美黄色 |