webserver

Why isn't _SERVER[“HTTPS”] set to 1?

时光总嘲笑我的痴心妄想 提交于 2021-02-18 22:29:45
问题 My site has an SSL cert and I'm hitting https://mysite.com/info.php, but under the PHP Variables section _SERVER["HTTPS"] is not being reported. I believe this is causing a problem with a Drupal site where some URLs are being written to the page as https://... where others are being written as http://... What determines if _SERVER["HTTPS"] is set? EDIT: This may be the answer to my problem Detecting HTTPS vs HTTP on server sending back nothing useful. Could be a load balancer issue 回答1: It

Socket server in python refuses to connect

时光怂恿深爱的人放手 提交于 2021-02-11 10:24:11
问题 I am trying to create a simple web server with python using the following code. However, When I run this code, I face this error: ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it It worths mentioning that I have already tried some solutions suggesting manipulation of proxy settings in internet options. I have run the code both in the unticked and the confirmed situation of the proxy server and yet cannot resolve the issue.

Apache virtual host on different ports doesn't work

試著忘記壹切 提交于 2021-02-10 14:36:18
问题 I'm trying to serve different folders on my localhost. I'm using Windows OS. I want to serve E:/Programming/Projects on localhost:8080 , and E:/htdocs on localhost:80 My httpd-vhosts.conf file is like that: Listen 8080 <VirtualHost *:8080> ServerName localhost DocumentRoot "E:/Programming/Projects" <Directory "E:/Programming/Projects"> AllowOverride All </Directory> </VirtualHost> When I attempt to navigate localhost:80, this port works well. But localhost:8080 gives this error: 403 -

www-data user unable to import installed python modules

前提是你 提交于 2021-02-08 10:51:28
问题 I am trying create a web-server which ultimately calls a python script ("MyScript.py") from PHP code with the following command echo exec("MyScript.py ....some arguments") MyScript.py actually contains a code which uses RDkit and other modules like numpy. When I run this MyScript.py from user (MKT)....it works like a charm. But the problem arises when it get executed from PHP script from server. The error message in /var/www/log/apache2/error.log is as follows: ImportError: No module named

www-data user unable to import installed python modules

≯℡__Kan透↙ 提交于 2021-02-08 10:50:02
问题 I am trying create a web-server which ultimately calls a python script ("MyScript.py") from PHP code with the following command echo exec("MyScript.py ....some arguments") MyScript.py actually contains a code which uses RDkit and other modules like numpy. When I run this MyScript.py from user (MKT)....it works like a charm. But the problem arises when it get executed from PHP script from server. The error message in /var/www/log/apache2/error.log is as follows: ImportError: No module named

www-data user unable to import installed python modules

喜你入骨 提交于 2021-02-08 10:49:40
问题 I am trying create a web-server which ultimately calls a python script ("MyScript.py") from PHP code with the following command echo exec("MyScript.py ....some arguments") MyScript.py actually contains a code which uses RDkit and other modules like numpy. When I run this MyScript.py from user (MKT)....it works like a charm. But the problem arises when it get executed from PHP script from server. The error message in /var/www/log/apache2/error.log is as follows: ImportError: No module named

Send image over http via socat bash webserver

℡╲_俬逩灬. 提交于 2021-02-08 08:59:48
问题 I am trying to write a webserver in bash using socat. I am having trouble serving image requests. I'm opening the socat listening connection like so: socat -T 30 -d -d TCP-L:$LISTENIP,reuseaddr,fork,crlf SYSTEM:"$0 \"docroot=$DOCROOT\"" I'm serving the image with the following, where $1 is the docroot and $2 is the image file name. function serve_png { if [ -e $1$2 ] then SIZE=`stat -c '%s' $1$2` echo -ne "HTTP/1.1 200 OK\nContent-type: image/png\nContent-length: $SIZE\n\n" cat $1$2 else echo

Is it possible to disable third-party cookies while on my site on behalf of users?

余生颓废 提交于 2021-02-07 14:28:07
问题 I have a website that loads a resource from another website. I've been able to determine that: The third-party website places cookies on the user's browser. If I disable third-party cookies in my browser settings, the third-party website is no longer able to place cookies on the browser. The resource still works properly. I'm wondering if there is some kind of header or other directive I can deliver from my website that will have the same effect for my users as if they had disabled third

How can I pass a socket from parent to child processes

不打扰是莪最后的温柔 提交于 2021-02-07 05:33:58
问题 I'm stuck on a problem in a C program on Linux. I know that when a processes is forked the child process inherits some things from the parent, including open file descriptors. The problem is that I'm writing a multi-process server application with a master process that accepts new connections and puts the descriptors into shared memory. When the child process attempts to read from one of these descriptors from the shared memory, on select() i got an EBADF error! How can the child process read

While apachectl start getting open shared object file

為{幸葍}努か 提交于 2021-02-05 08:10:45
问题 I try to install apache webserver using tar file. So, I have download httpd-2.4.tar file and extract. then, I try to install 1. ./configure --prefix=/usr/local/apache but, throw, this error configure: error: APR not found. Please read the documentation. configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/ so, follow this link and fix this issue1 and issue2 Then, run following command: 1. $./configure \ --with-included-apr \ --with-pcre=/usr