apache2

Do CGI and mod_perl play nicely together?

喜你入骨 提交于 2019-12-22 13:59:57
问题 I've got an apache web server (without mod_perl) that's been running just fine for a long time. It has been suggested that we use mod_perl to improve the performance of some scripts. I want to go ahead and install mod_perl on the server, which seems to be a relatively straightforward process, but I'm confused by some of the stuff coming up on Google searches. If I install mod_perl (through the debian repositories), will all of my existing CGIs suddenly start "using mod_perl" and exhibiting

IE Sending OPTIONS Request for File Downloads

陌路散爱 提交于 2019-12-22 13:30:31
问题 On my site I have a very basic setup: an 'a href' tag that just points to a file. Nothing fancy: <a href="/path/to/my/file.doc">File</a> No fancy javascript, nothing. Some users who are using old IE versions less than 8 have been having spotty problems downloading different files like this. What I've been able to trace it back to is that IE will send an OPTIONS request for the file (and even then not all the time). Since I'm not running a Webdav server, I had mod_security set at the default

Getting the body of an http POST request, using mod-perl 2

半腔热情 提交于 2019-12-22 11:37:30
问题 I am writing a quick script to munge a submitted file, and return that content to the user. My test code looks like this: #!/path/to/bin/perl use strict; use warnings; use utf8; use Apache2::RequestRec; use Apache2::RequestIO; my ( $xmlin, $accepts ) = (q{}, q{}); my $format = 'json'; # read the posted content while ( Apache2::RequestIO::read($xmlin, 1024) ) {}; { no warnings; $accepts = $Apache2::RequestRec::headers_in{'Accepts'}; } if ($accepts) { for ($accepts) { /application\/xml/i && do

How to deny site access from an iframe?

故事扮演 提交于 2019-12-22 09:40:11
问题 I've noticed a few websites deny access from iFrames to their registration and login pages for security reasons. It's a good idea in my opinion. I'm wondering what settings they need in order to do this as I would like to do the same on my website. The website in question is built in Java and runs on Apache Tomcat. If anyone knows how this is done it would be great if you could share. 回答1: well, you should use the x-frame-options . read this article, hope it helps: http://blogs.msdn.com/b

Serving static files through apache

会有一股神秘感。 提交于 2019-12-22 08:25:46
问题 I am new to the whole mod_wsgi and serving files through apache. I am really comfortable with flask but this is something i can't get my head around. I did the hello-world program and successfully displayed hello world! Now i wanted to display a image file. So I updated my hello-world.py to: from flask import * yourflaskapp = Flask(__name__) @yourflaskapp.route("/") def hello(): file="203.jpg" return render_template("hello.html",file=file) # return"HEY" if __name__ == "__main__": yourflaskapp

How to have separate Apache2 log files depending on the user of mod_userdir?

怎甘沉沦 提交于 2019-12-22 08:03:18
问题 I'm using mod_userdir on Apache 2.2 to give multiples users access to a web server (for their tests and other stuff). I would like to give my users access to apache logs (so that they can debug their scripts) but log entries (both ErrorLog and CustomLog : error.log and access.log ) are combined together (whatever "user" directory is concerned). Is there a way to separate log into multiple files (depending of the user). Apache version : 2.2.16 " /etc/apache2/sites-enabled/000-default " config

.htaccess rewrite to another port

六月ゝ 毕业季﹏ 提交于 2019-12-22 07:57:23
问题 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 :) 回答1: Alright i found out the way :)

Change mod_wsgi from python3.5 to 3.6

点点圈 提交于 2019-12-22 06:59:30
问题 I have a flask app that used to run with python3.5 on apache2. I am now trying to change it to run on 3.6 (i have sone type hinting in my code that is only supported on 3.6). I have installed the module for python3.6, but when tried to restart apache and run my app, it fails. When running mod_wsgi-express module-location I have the python3.5 version /usr/local/lib/python3.5/dist-packages/mod_wsgi/server/mod_wsgi-py35.cpython-35m-x86_64-linux-gnu.so The same file also existis on my server in

How can I check apache modules version?

蓝咒 提交于 2019-12-22 04:32:46
问题 How do I get versions of apache modules on debian? I can get loaded modules list by apache2ctl -M - but how do I get their version numbers? 回答1: apt-cache show libapache2-mod-foobar | grep Version 回答2: $ strings /usr/lib/apache2/modules/mod_pagespeed.so \ | grep "mod_pagespeed/[0-9]\.[0-9]" mod_pagespeed/w.x.y.z Find more at http://thinkinginsoftware.blogspot.com/2015/10/find-out-apache-module-version.html 回答3: Did you try this? apt-cache policy libapache2-mod-foobar 来源: https://stackoverflow

How can I check apache modules version?

≡放荡痞女 提交于 2019-12-22 04:32:08
问题 How do I get versions of apache modules on debian? I can get loaded modules list by apache2ctl -M - but how do I get their version numbers? 回答1: apt-cache show libapache2-mod-foobar | grep Version 回答2: $ strings /usr/lib/apache2/modules/mod_pagespeed.so \ | grep "mod_pagespeed/[0-9]\.[0-9]" mod_pagespeed/w.x.y.z Find more at http://thinkinginsoftware.blogspot.com/2015/10/find-out-apache-module-version.html 回答3: Did you try this? apt-cache policy libapache2-mod-foobar 来源: https://stackoverflow