lighttpd

nginx、Apache、Lighttpd启用HSTS

夙愿已清 提交于 2020-01-20 02:06:21
http://www.ttlsa.com/web/hsts-for-nginx-apache-lighttpd/ 302跳转 通常情况下,我们将用户的 HTTP 请求 302 跳转到 HTTPS,这会存在两个问题: 不够安全,302 跳转会暴露用户访问站点,也容易被劫持 拖慢访问速度,302 跳转需要一个 RTT(The role of packet loss and round-trip time),浏览器执行跳转也需要时间 HSTS 302 跳转是由浏览器触发的,服务器无法完全控制,这个需求导致了 HSTS(HTTP Strict Transport Security)的诞生。HTSP 就是添加 header 头(add_header Strict-Transport-Security max-age=15768000;includeSubDomains),告诉浏览器网站使用 HTTPS 访问,支持HSTS的浏览器(Chrome, firefox, ie 都支持了 HSTS(http://caniuse.com/#feat=stricttransportsecurity))就会在后面的请求中直接切换到 HTTPS。在 Chrome 中会看到浏览器自己会有个 307 Internal Redirect 的内部重定向。在一段时间内也就是max-age定义的时间,不管用户输入www

nginx、Apache、Lighttpd启用HSTS

二次信任 提交于 2020-01-20 02:05:37
302跳转 通常情况下,我们将用户的 HTTP 请求 302 跳转到 HTTPS,这会存在两个问题: 不够安全,302 跳转会暴露用户访问站点,也容易被劫持 拖慢访问速度,302 跳转需要一个 RTT(The role of packet loss and round-trip time),浏览器执行跳转也需要时间 HSTS 302 跳转是由浏览器触发的,服务器无法完全控制,这个需求导致了 HSTS(HTTP Strict Transport Security)的诞生。HTSP 就是添加 header 头(add_header Strict-Transport-Security max-age=15768000;includeSubDomains),告诉浏览器网站使用 HTTPS 访问,支持HSTS的浏览器(Chrome, firefox, ie 都支持了 HSTS(http://caniuse.com/#feat=stricttransportsecurity))就会在后面的请求中直接切换到 HTTPS。在 Chrome 中会看到浏览器自己会有个 307 Internal Redirect 的内部重定向。在一段时间内也就是max-age定义的时间,不管用户输入www.ttlsa.com还是http://www.ttlsa.com,都会默认将请求内部跳转到https://www

nfs服务、计划任务crond服务和shell

£可爱£侵袭症+ 提交于 2020-01-16 20:43:27
一、nfs服务 NFS 是Network File System的缩写,即网络文件系统。一种使用于分散式文件系统的协定,由Sun公司开发,于1984年向外公布。功能是通过网络让不同的机器、不同的操作系统能够彼此分享个别的数据,让应用程序在客户端通过网络访问位于服务器磁盘中的数据,是在类Unix系统间实现磁盘文件共享的一种方法。   NFS 的基本原则是“容许不同的客户端及服务端通过一组RPC分享相同的文件系统”,它是独立于操作系统,容许不同硬件及操作系统的系统共同进行文件的分享。 NFS在文件传送或信息传送过程中依赖于RPC协议。RPC,远程过程调用 (Remote Procedure Call) 是能使客户端执行其他系统中程序的一种机制。NFS本身是没有提供信息传输的协议和功能的,但NFS却能让我们通过网络进行资料的分享,这是因为NFS使用了一些其它的传输协议。而这些传输协议用到这个RPC功能的。可以说NFS本身就是使用RPC的一个程序。或者说NFS也是一个RPC SERVER。所以只要用到NFS的地方都要启动RPC服务,不论是NFS SERVER或者NFS CLIENT。这样SERVER和CLIENT才能通过RPC来实现PROGRAM PORT的对应。可以这么理解RPC和NFS的关系:NFS是一个文件系统,而RPC是负责信息的传输。 1、安装 yum install

HTML button launch Shell script

删除回忆录丶 提交于 2020-01-16 12:00:12
问题 Working with: Linux Debian Lighttpd Server PHP7.0 I want to launch some shell scripts pressing HTML buttons. All the files are placed in /var/www/html The rights are done by: sudo chown www-data:www-data /var/www/ So, I wrote some code: HTML test code (index.html): <form action="openApp.php"> <input type="submit" value="Open Script"> </form> PHP test code (openApp.php): <?php exec('nautilus'); header('Location: http://localhost/index.html?success=true'); ?> But no luck, nothing is working.

fastcgi, cherrypy, and python

末鹿安然 提交于 2020-01-13 10:33:30
问题 So I'm trying to do more web development in python, and I've picked cherrypy, hosted by lighttpd w/ fastcgi. But my question is a very basic one: why do I need to restart lighttpd (or apache) every time I change my application code, or the code for an underlying library? I realize this question extends from a basic mis(i.e. poor)understanding of the fastcgi model, so I'm open to any schooling here, but I'm used to just changing a PHP file and it showing up, versus having to bounce the web

fastcgi, cherrypy, and python

喜夏-厌秋 提交于 2020-01-13 10:33:29
问题 So I'm trying to do more web development in python, and I've picked cherrypy, hosted by lighttpd w/ fastcgi. But my question is a very basic one: why do I need to restart lighttpd (or apache) every time I change my application code, or the code for an underlying library? I realize this question extends from a basic mis(i.e. poor)understanding of the fastcgi model, so I'm open to any schooling here, but I'm used to just changing a PHP file and it showing up, versus having to bounce the web

Django + FastCGI - randomly raising OperationalError

我的梦境 提交于 2020-01-10 14:36:30
问题 I'm running a Django application. Had it under Apache + mod_python before, and it was all OK. Switched to Lighttpd + FastCGI. Now I randomly get the following exception (neither the place nor the time where it appears seem to be predictable). Since it's random, and it appears only after switching to FastCGI, I assume it has something to do with some settings. Found a few results when googleing, but they seem to be related to setting maxrequests=1. However, I use the default, which is 0. Any

lighttpd URL Redirect - subdirectory to root

回眸只為那壹抹淺笑 提交于 2020-01-07 05:23:08
问题 I have a lighttpd setup with a structure along the lines of /var/www /var//www/php /var/www/icons Icons used to be a folder inside the php folder but I moved it to make the job of synchronizing folder contents easier - since the icons folder contents do not change very often. However, this has left me with a legacy of references in CSS markup and JavaScript code that seek out images at /var/www/php/icons. I have played around with url.redirect url.redirect = ("/var/www/php/icons" => "/var/www

nginx setup question

一笑奈何 提交于 2020-01-03 08:57:11
问题 I know this is not directly a programming question, but people on stackoverflow seems to be able to answer any question. I have a server running Centos 5.2 64 bit. Pretty powerful dual core 2 server with 4GB memory. It mostly serves static files, flash and pictures. When I use lighttpd it easily serves over 80 MB/sec, but when I test with nginx it drops down to less than 20 MB/sec. My setup is pretty straight forward, uses the default setup file, and I have added the following user lighttpd;

Removing .php from urls with lighttpd (clean urls)

一曲冷凌霜 提交于 2020-01-03 05:44:04
问题 I am migrating an over loaded server from apache2 to lighttpd, currently I am proxying all the static resources from the lighttpd server but that still doesn't fix the load problems. I want to migrate everything to lighttpd but I've run into a problem. Apache2 has multiviews functionality to clean up URLs which lighttpd doesn't. I found the following code to do it in lighttpd url.rewrite-if-not-file = ( "^([^?]*)(\?.*)?$" => "$1.php$2" ) It works but it has two problems 1: website.com/