简体   繁体   English

从Apache服务器的SSL中排除/ var / www / html中的文件

[英]Exclude a file in /var/www/html from SSL in apache server

I have a home server running on apache at /var/www/html , I also created a self signed SSL at DocumentRoot /var/www/html in /etc/apache2/sites-available/default-ssl.conf 我在/var/www/html apache上运行了家庭服务器,还在/etc/apache2/sites-available/default-ssl.conf DocumentRoot /var/www/html处创建了自签名SSL。

How can I exclude a file within html from SSL, for example, my current server is https://myserver.com , but I want to use http://myserver.com/nossl/api.php 如何从SSL排除html的文件,例如,我当前的服务器是https://myserver.com ,但是我想使用http://myserver.com/nossl/api.php

What should I add in .htaccess of that nossl folder? 我应该在该nossl文件夹的.htaccess中添加什么?

This is my current .htaccess to exclude authentication 这是我当前的.htaccess排除身份验证

<Files main.php>
    AuthType none
    Satisfy any

    Order Allow,Deny
    Allow from all
</Files>

Since I can't find any direct solution to this, I did find a way of free SSL using letsencrypt 由于找不到任何直接的解决方案,所以我确实找到了使用letencrypt的免费SSL的方法

Working great on multiple servers 在多台服务器上都能正常工作

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

相关问题 在 apache 服务器的 /var/www 中找不到.php 文件 - Could not find .php file in /var/www in apache server 无法从AWS Lite上的服务器/ var / www / html加载index.php codeigniter文件 - index.php codeigniter file doesn't load from server /var/www/html on aws lite 从html上传文件将文件保存在/ var / www中 - Save file in /var/www from html upload file 无法从file.php在/ Var / www / html中创建文件夹 - Failing to create folder in /Var/www/html from file.php 从/ var / www / pdf /目录将PDF文件嵌入html - Embed PDF file in the html from /var/www/pdf/ directory Apache为var / www文件夹中的文件抛出404 - Apache throwing 404 for a file in var/www folder 如何在Ubuntu的apache2服务器上获得对/ var / www / html的编辑权限 - how to get edit access to /var/www/html on apache2 server on Ubuntu apache php javascript-无法打开流:/ var / www / html / bla中没有此类文件或目录 - apache php javascript - Failed to open stream: No such file or directory in /var/www/html/bla 我无法将PHP中的文件复制到apache2 Web服务器中/ var / www之外的另一个目录中 - I can not copy a file in PHP to another directory out of /var/www in my apache2 web server 如何在apache /var/www/demo.html中的html java脚本中从php-url运行json解析 - how to run json parsing from php-url in html java script in apache /var/www/demo.html
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM