apache2

Redirect website but maintain my url in browser address bar

两盒软妹~` 提交于 2019-12-24 11:35:30
问题 While our new website is under development we want to allow a small user base to look at the new site and get feedback. Our current site www.sitea.com will remain functional and available but we want them to visit www.sitea.com/v2 and have the browser maintain the url www.sitea.com/v2 but show the contents of the new site www.siteb.com is this possible? Preferably this would be done with an .htaccess file if possible I am open to other suggestions though. 回答1: Maybe, you can use ProxyPass for

Sethandler fcgi proxy not working on Ubuntu 14.04/Apache 2.4.7 php7.2-fpm

佐手、 提交于 2019-12-24 11:27:42
问题 I need to run PHP 5.6 with mod_php and PHP 7.2 with php-fpm/mod-fastcgi parallel on a Ubuntu 14.04 machine. On a different machine with Ubuntu 16.04, Apache 2.4 and PHP 7.1/mod_php and PHP 7.2/php-fpm everything works as expected. My steps: apt install libapache2-mod-fastcgi php7.2-fpm php7.2 php7.2-common a2enmod actions fastcgi alias proxy_fcgi I set up an fpm conf file with a different pool name, username and group, socket file /var/run/php/php7.2-fpm-mysite.sock. Service php7.2-fpm is

Get current domain name from request in Nuxt

橙三吉。 提交于 2019-12-24 11:24:29
问题 How can I get the current domain name from a request on server side? My Nuxt based website is reachable from different domains. I would like to get the domain name from where the user has accessed the website. How can I do this? I tried to write a middleware for that purpose but it always displays localhost:3000 export default function({ store, req }) { if (process.server) store.commit('hostname', req.headers.host) } Any idea how to fix this issue? 来源: https://stackoverflow.com/questions

Shutting down computer from a python script in apache

半腔热情 提交于 2019-12-24 09:18:27
问题 I have a headless Raspberry Pi which I want to have an easy means for my child to power down. I tried the following script in the apache web server: import os sss = os.popen('echo password | sudo -S shutdown -hP now') print sss.read() But nothing happens. Then I tried: from subprocess import Popen, PIPE, STDOUT p = Popen('echo password | sudo -S shutdown -hP now', shell=True, stdOUT=PIPE, stderr=STDOUT) print p.stdout.read() Also, nothing was output and no work appears to have been done. How

Need help setting up Apache on CentOS 5.5 , getting 403

孤街醉人 提交于 2019-12-24 09:14:50
问题 I have purchased a VPS and I have done everything described here (version 2.2.17) : http://httpd.apache.org/docs/current/install.html I have apache running, but I can not view the page in browser. Chrome says : Oops! Google Chrome could not connect to ... and when I lynx localhost I get [error] [client 127.0.0.1] (13)Permission denied: access to / denied I tried chmod 744 htdocs/index.html but still nothing. Apache is running httpd (pid 7638) already running And here is the conf/httpd.conf

How to speed up web development with correct Apache caching headers setup?

会有一股神秘感。 提交于 2019-12-24 08:47:05
问题 Despite various measure ments to setup correct caching code in htaccess file, I still get this error: Specify a cache validator : All static resources should have either a Last-Modified or ETag header. This will allow browsers to take advantage of the full benefits of caching. Is there anything wrong with my htaccess caching settings? If you have improvements for these settings i will be very happy to hear. Thank you very much for your suggestions. <IfModule mod_headers.c> Header unset Pragma

2 codeigniter applications & htaccess

强颜欢笑 提交于 2019-12-24 08:39:02
问题 I had a codeigniter proyect working in windows with XAMPP and now I was moving it to my RaspberryPi: Apache/2.2.22 (Debian) PHP 5.4.4-14+deb7u5 mysql Ver 14.14 Distrib 5.5.31 I have two codeignitir aplications (principal and panel) with this estructure / -> (apache root folder) /appname/admin /admin/application/ -> (codeigniter application to panel) /appname/application/ -> (codeigniter application to public) Now I can't access to admin controllers and I think is because .htaccess. I get this

Apache on Windows cant find php extensions

那年仲夏 提交于 2019-12-24 07:58:57
问题 I have Apache 2.4 and php installed on Windows Server 2012. Im trying to load the php_ldap.dll extension. Here's what Ive done: In php.ini I set the following: extension_dir = "C:\php\ext" extension=php_ldap.dll Then, I made sure the dll was available at that path, yep, it's there: phpinfo shows that I am editing the correct php.ini and the extension_dir is updated. However, when I start Apache, php_ldap.dll is not loaded. The Apache logs show this warning: PHP Warning: PHP Startup: Unable to

Apache crashes with error R6016 not enough space for thread data

谁都会走 提交于 2019-12-24 07:54:13
问题 My application works properly except in some cases I get this error R6016 not enough space for thread data So I am now investigating why I get this error. I am not surre If my app is causing this or something in the backend. Here is a xml from the windows event log of the error - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> - <System> <Provider Name="Application Error" /> <EventID Qualifiers="0">1000</EventID> <Level>2</Level> <Task>100</Task> <Keywords

Apache2 Reverse Proxy with authentication over OpenID Connect and authorization over ldap

拜拜、爱过 提交于 2019-12-24 06:04:44
问题 I'm trying to setup a reverse proxy that requires authentication against an OpenID Connect Identity Provider. The User then grants the reverse proxy access to his data. Some applications behind the proxy are only accessible by the user if he is the member of specific LDAP groups. Sadly the applications are the dump and cannot authorize themselves, so the reverse proxy must handle that part. It wasn't so hard to setup the authentication part with mod_auth_openidc. What I struggle with is the