lighttpd

Why PHP Session Destroyed?

我的梦境 提交于 2019-12-07 07:11:25
问题 I have this php code, <?php session_start(); Print_r($_SESSION); $_SESSION['value'] = 1; Print_r($_SESSION); ?> Why it Prints following, everytime when I refreshes the page.. Array ( ) Array ( [value] => 1 ) It should Print, Array ( [value] => 1 ) Array ( [value] => 1 ) I am using lighttpd as http Server on Fedora 14. 回答1: I read that running chown -R root:lighttpd /var/lib/php/ fixed the problem for others that were having the same issue. Source: http://masdeni.com/archives/6-Lighttpd-+-PHP

CORS request did not succeed on Firefox but works on Chrome

我只是一个虾纸丫 提交于 2019-12-07 05:31:42
问题 I'm making CORS requests from https://169.254.128.2:8443 to APIs served on https://169.254.128.2:8444 by lighttpd server. Lighttpd has CORS enabled with the following response headers but the OPTIONS request does not go through on Firefox. setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" (tried https://169.254.128.2:8443 too), "Access-Control-Allow-Headers" => "accept, origin, x-requested-with, content-type, x-transmission-session-id, x-ida-auth-token, content-disposition",

Websockets. FastCGI or WSGI. SSL. Same domain. How?

空扰寡人 提交于 2019-12-06 11:05:21
Question I've built an app in two parts: a low-overhead server which listens for long-polling and websocket connections using Socket.IO and a regular WSGI-compatible Python webapp. The former would be bound to the path /socket.io/ and the latter to every other path. Additionally, files in /static/ can be served directly from the filesystem and with far-future expiration headers. I figured it would easy to put a proxy in front of the two services which would serve the whole site via SSL, but I can't find a good solution. Can you help? Background I split the app into two parts because it made

How to handle chunked encoding request properly?

六眼飞鱼酱① 提交于 2019-12-06 10:26:24
问题 I have two websites: one with Lighttpd with PHP and second with Apache and neither of this handle chunked transfer encoding properly. I send this request from my mobile, J2ME and there is no possibility to change this transfer type to any other. So my only way to go is to handle chunked transfer enconcoded requests in other way. Any solution will be good as long as I can enable it on my CentOS server where I can install and change everything that will be necessary. So my question is: how to

fastcgi multiplexing?

半腔热情 提交于 2019-12-06 06:47:20
问题 I'm in process of implementation of a fastcgi application, after reading fastCGI spec I've found a feature called "request multiplexing". It reminded me Adobe RTMP multiplexing back in the days that protocol was proprietary and closed. As far as I understand, multiplexing allows to reduce overhead of creating new connections to FCGI clients effectively interweaving requests chunks, and at the same time enabling "keep-alive" model to connection. Latter allows sending several requests over a

Flask deployement on lighttpd and raspberry pi

戏子无情 提交于 2019-12-06 05:52:49
问题 I'm trying to deploy a hello flask app to a raspberry pi using lighttpd fastCGI. I followed the instructions on the http://flask.pocoo.org/docs/0.10/deploying/fastcgi/ to the best of my ability Here is my flask app (/var/www/demoapp/hello.py) from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World From Flask Yeh!" if __name__ == "__main__": app.run(host='0.0.0.0', port=5000) And here is my .fcgi file (/var/www/demoapp/hello.fcgi) #!/usr/bin/python from

.htaccess rewrite to another port

被刻印的时光 ゝ 提交于 2019-12-05 12:06:48
I have a joomla setup in my /home/joomla directory. I installed both Apache and Lighttpd i have configured Lighttpd to proxy only static files, and lighttpd is listening on port 81. Now what i want is whenever request for static files are made, instead of going to www.domain.com/whatever/bg.jpg it should redirect to domain.com:81/whatever/bg.jpg using .htaccess also notice that www.domain.com changed to domain.com please please i need a quick help for it :) Alright i found out the way :) RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] RewriteRule \.(jpg|jpeg|png|gif|css)$ http://domain.com:81/$1 [P

Lighttpd Reverse Proxy Settings

空扰寡人 提交于 2019-12-05 10:25:41
I am trying to configure Lighttpd to act as a reverse proxy. I want to have several URLs that are proxied to different servers on different ports, either on the same machine or within the local network. For example: / /static /socket /ajax Lighttpd would proxy all of the connections except those to /static . I want to serve all requests to /static directly from this instance of lighttpd. Here is the config file for mod_proxy: ## # Serve Static Content via Lighttpd. # $HTTP["url"] =~ "^/static/" { server.document-root = "/path/to/my/static/files" accesslog.filename = rootdir + "/var/log/static

CORS request did not succeed on Firefox but works on Chrome

有些话、适合烂在心里 提交于 2019-12-05 09:56:15
I'm making CORS requests from https://169.254.128.2:8443 to APIs served on https://169.254.128.2:8444 by lighttpd server. Lighttpd has CORS enabled with the following response headers but the OPTIONS request does not go through on Firefox. setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" (tried https://169.254.128.2:8443 too), "Access-Control-Allow-Headers" => "accept, origin, x-requested-with, content-type, x-transmission-session-id, x-ida-auth-token, content-disposition", "Access-Control-Expose-Headers" => "X-Transmission-Session-Id", "Access-Control-Allow-Methods" => "GET

How to improve PHP performance?

*爱你&永不变心* 提交于 2019-12-05 02:49:24
问题 I've created PHP application for Facebook. It uses MySQL, Memcached and works on Lighttpd on Centos 2,6 Ghz and 2 GB RAM. it's basically one PHP file that after first run is cached and every next time it's served in 0,8 ms directly from Memcached. What more can I do to shorten this time? 回答1: Once you get to 0.8 ms, I'm not sure you can go any lower. However, you can set up multiple servers to handle many concurrent requests (with a common memcached). You will then be able to scale very high