[英]Html, CSS files apache permissions
I have a question about file permissions of html - css files served by httpd (on CentOS). 我对html的文件权限有疑问-httpd提供的css文件(在CentOS上)。
I have a website with several html - php - css files. 我有一个带有多个html-php-css文件的网站。 When a user enters the URL of my website, index.html is displayed as it should.
当用户输入我的网站的URL时,将按原样显示index.html。 I tried to browse one of my css files (just for fun), and I realized that css source code is displayed in the browser.
我试图浏览我的一个css文件(只是为了好玩),我意识到css源代码显示在浏览器中。 I do not publish the css files and their exact names of course, but some names (eg style.css , bootstrap.css etc) are trivial, and one can try and get the styling of my webpage easily.
我当然不会发布css文件及其确切名称,但是有些名称(例如style.css,bootstrap.css等)是微不足道的,并且可以尝试轻松地获得我网页的样式。
What is the solution to that? 有什么解决方案? I cannot take off the read permissions of these files, because apache would not style the html files (since it will not be able to read the css).
我无法取消这些文件的读取权限,因为apache不会设置html文件的样式(因为它将无法读取css)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.