httpd.conf

include files from anywhere on the server

徘徊边缘 提交于 2019-12-02 15:48:44
问题 I have website running perfectly on production server. I have moved it to another web server. (VPS). Let me explain you with example: The directory structure: includes/ header.php business/ index.php some other files... index2.php In my previous version, I used include_once(includes/header.php) in index.php and index2.php. It runs fine. but in my new server setup it's giving me error regarding path (obvious). ERROR: include_once(includes/header.php): failed to open stream: No such file or

Apache Proxy: No protocol handler was valid

主宰稳场 提交于 2019-12-02 13:52:22
I am trying to proxy a subdirectory to another server. My httpd.conf: RewriteEngine On ProxyPreserveHost On RewriteRule .*subdir/ https://anotherserver/subdir/ [P] The problem is that Apache is always logging this: AH01144: No protocol handler was valid for the URL /subdir/. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule., referer: http://localhost/ So after searching the internet, I have activated these modules: LoadModule headers_module modules/mod_headers.so LoadModule proxy_module modules/mod_proxy.so

Move to https://www, when it is www or http:// or without www and http://?

自作多情 提交于 2019-12-02 13:30:40
I am using Zend framework where i have nice looking url controllers. Following .htaccess is working but its making SEO to see us as four links for one page. RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R] I need to do following fix using htaccess: www.stackoverflow.com/nice-looking-url = https://www.stackoverflow.com/nice-looking-url stackoverflow.com/nice-looking-url =

Serve Django to remote apache server

末鹿安然 提交于 2019-12-02 11:26:20
computer 2=win-64bit computer 1= ubuntu 14.04 Django=1.7 (on computer 1) (runs within a virtualenv) python= python 2.7 Apache= apachehaus 2.4 (on coumputer 2) Basically what I am trying to do is have a Django Apache pair on separate computers. so computer 1 is ubuntu running the django and computer 2 is windows running apache24 I am very new to web-dev stuff but I believe it would look like the following: Stack 1 web-access --> Apache-Loaded-mod_wsgi (computer 2) --> Django (computer 1) or is it? I really have no idea. Stack 2 web-access --> Apache(computer 2) --> Apache-Loaded-mod_wsgi

Virtual Host cannot create with XAMPP server

依然范特西╮ 提交于 2019-12-02 11:00:41
I add the following codes in httpd-vhost.conf file. <VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/mmcast" ServerName mmcast.dev <Directory "C:/xampp/htdocs/mmcast"> AllowOverride All Require all granted </Directory> Although I can run the Apache and MySQL in XAMPP but I cannot call my vhost. I got "Unable to connect" error in when I call mmcast.dev in browser. Do I need to change <VirtualHost *:80> into 81 ? Because I change Listen 81 in httpd file. But, I tried to change 80 to 81 but it still does not work. In httpd.conf file, I change like this but it does not work. <Directory />

tricky apache rewrite configuration

萝らか妹 提交于 2019-12-02 10:54:42
I have a URL of the form http://example.com/fetchjobs.action?jobType=crons&jobList=foo&categoryModeId=0&showOnlyLatest=true And I want to redirect above url to url below http://newexample.com/crons?jobList=foo&categoryModeId=0&showOnlyLatest=true Note: domain got changed from example.com to newexample.com. Value of "jobType" is in a URL path now instead of query param. (jobType=crons vs /crons?) All other query parameters are retained as query params in a new URL. There can be any number of query parameters in source URL. Leads here is appreciated. Try this : RewriteEngine On RewriteCond %

redirect http to https through httpd.conf

谁说我不能喝 提交于 2019-12-02 09:24:53
问题 Need to change http to https. http://myServerName/itf/sheldon/imex/ajax/share_details/v1/CH0012221716/issuer/contact.json **Should change to** https://myServerName//itf/sheldon/imex/ajax/share_details/v1/CH0012221716/issuer/contact.json To do this I have following in my httpd.conf file *LoadModule rewrite_module modules/mod_rewrite.so RewriteCond %{HTTPS} off RewriteEngine On RewriteRule ^(.*)(\/itf)(\/sheldon\/)(.*)\.(json|JSON)$ https://myServerName/$2$3$4.json [L,R=301,NC] RewriteRule "^(.

include files from anywhere on the server

北战南征 提交于 2019-12-02 07:42:13
I have website running perfectly on production server. I have moved it to another web server. (VPS). Let me explain you with example: The directory structure: includes/ header.php business/ index.php some other files... index2.php In my previous version, I used include_once(includes/header.php) in index.php and index2.php. It runs fine. but in my new server setup it's giving me error regarding path (obvious). ERROR: include_once(includes/header.php): failed to open stream: No such file or directory And because of that: Fatal error: Class 'EncryptionClass' not found I think there are some

How to run a python script in localhost using XAMPP in MAC OS

不打扰是莪最后的温柔 提交于 2019-12-02 07:14:27
I'm trying to run a simple Python script using XAMPP in my MAC. I have followed this link . Anyway I'll tell what I've done in steps. I'm running MAC OS X 10.9.5 and I have python 2.7.5 and python 3.4.1 both installed in this machine. Also I have successfully installed XAMPP 1.8.3-5 in this machine and tested with PHP and HTML pages. Next thing I did was creating a directory named cgi-bin in the path /Volumes/Macintosh\ HD/Applications/XAMPP/xamppfiles/htdocs/ . Inside that directory I've created file name called first.py with the content with below. #!/usr/bin/env python print "Content-type:

redirect http to https through httpd.conf

三世轮回 提交于 2019-12-02 04:42:26
Need to change http to https. http://myServerName/itf/sheldon/imex/ajax/share_details/v1/CH0012221716/issuer/contact.json **Should change to** https://myServerName//itf/sheldon/imex/ajax/share_details/v1/CH0012221716/issuer/contact.json To do this I have following in my httpd.conf file *LoadModule rewrite_module modules/mod_rewrite.so RewriteCond %{HTTPS} off RewriteEngine On RewriteRule ^(.*)(\/itf)(\/sheldon\/)(.*)\.(json|JSON)$ https://myServerName/$2$3$4.json [L,R=301,NC] RewriteRule "^(.*)(\/itf)(\/fqs\/)(.*)\.(json|JSON)(.*)$" https://myServerName/itf/fqs/$4.json$6 [R=301,L,NC] Include