httpd.conf

URL rewrite in Apache for POST/DELETE/PUT

女生的网名这么多〃 提交于 2019-12-02 02:49:28
I have my url like this http://10.243.123.1/v1/data/register I want to redirect/rewrite this url to https://10.243.123.1/data/register (This is HTTP POST/PUT/DELETE url) i.e 1.should remove v1 and make https 2.If url does not contains v1 then just make https alone. What rule should in need to add in httpd.conf file..?? Whether rule goes to httpd.conf or .htacccess file? Please share your thoughts Put this code in your DOCUMENT_ROOT/.htaccess file: RewriteEngine On RewriteCond %{REQUEST_METHOD} !POST RewriteCond %{THE_REQUEST} \s/+v1/(\S+) [NC] RewriteRule ^ https://%{HTTP_HOST}/%1? [R=302,L,NE

How do I enable mod_deflate for PHP files?

末鹿安然 提交于 2019-12-02 00:02:27
I have a Liquid Web VPS account, I've made sure that mod_deflate is installed and running/active. I used to gzip my css and js files via PHP, as well as my PHP files themselves... However, I'm now trying to do this via mod_deflate, and it seems to work fine for all files except for PHP files. (Txt files work fine, css, js, static HTML files, just nothing that is generated via a PHP file.) How do I fix this? (I used the "Compress all content" option under "Optimize Website" in cPanel, which creates an .htaccess file in the home directory (not public_html, one level higher than that) with

apache reverse proxy changes url

大兔子大兔子 提交于 2019-12-01 09:17:55
问题 i tried to configure apache's reverse proxy on a server to redirect the requests from /hotm to http://gateway.messenger.hotmail.com typing the addres xxx.xxx.xxx.xxx/hotm in a browser, the request is redirected correctly, but the url in the address bar changes to "http://gateway.messenger.hotmail.com". it's possible to configure the proxy on apache so that the address does not change? [edit] this is the httpd.conf fragment ProxyRequests Off ProxyPass /hotm http://gateway.messenger.hotmail.com

How do I change the default path of PHP in XAMPP?

一个人想着一个人 提交于 2019-12-01 05:51:27
I am using xampp for deploying web apps. It includes the PHP module in a package. Now what I want to do is change the default path to PHP so that I can make use of other versions of PHP without overwriting the existing module. My new copy of PHP exists on the desktop. How can I configure Apache to refer to the PHP module present on the desktop, rather than the default one? Download your desired version of the PHP thread-safe binary (zipped) from http://windows.php.net/download/ . Unzip the downloaded version of the PHP in a separate directory. Please make sure that your new php directory's

Apache 2.2 ignoring VirtualDocumentRoot VirtualHosts?

蹲街弑〆低调 提交于 2019-12-01 05:10:52
问题 I have several domains that I would like to have wildcard subdomains enabled for through mod_vhost_alias Included in my httpd.conf I have the following generalized rules: <VirtualHost [ip here]:80> ServerName domain1.com ServerAlias www.domain1.com DocumentRoot /home/user1/public_html </VirtualHost> <VirtualHost [ip here]:80> ServerName *.domain1.com VirtualDocumentRoot /home/user1/subdomains/%-3+ </VirtualHost> <VirtualHost [ip here]:80> ServerName domain2.com ServerAlias www.domain2.com

500 Error on apache server - “AllowOverride not allowed here”

廉价感情. 提交于 2019-11-30 21:39:58
I have set up a server on my Mac (OSX 10.9) but it's returning a 500 error with the following message in the error log… [alert] [client ::1] /Users/user/Sites/mysite/.htaccess: AllowOverride not allowed here Here's the code in my .htaccess file Options +FollowSymLinks -MultiViews AllowOverride All # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteMap lc int:toLower RewriteCond %{REQUEST_URI} [A-Z] RewriteRule (.*) ${lc:$1} [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^i/(.*)/(.*)-(.*)$ /items/?id=$1&range=$2&type=$3 [L,QSA,NC] RewriteCond %{REQUEST_FILENAME} !-f

mod_xsendfile for Win x64?

强颜欢笑 提交于 2019-11-30 20:55:04
I'm trying to install the mod_xsendfile Apache Module on Windows (7) x64 (using Apache 2.2) -- yes I'm doomed from the get-go, I know :-). Apparently there is : a) No Win x64 binary for mod_xsendfile, just a Win32 binary from the module's website b) No Win x64 binary for apxs from ApacheLounge I've tried the usual LoadModule xsendfile_module modules/mod_xsendfile.so but the semi-obvious error ( httpd: Syntax error on line 127 of C:/Apache/conf/httpd.conf: Cannot load C:/Apache/modules/mod_xsendfile.so into server: The specified module could not be found. ) occurs, it's not Win x64 compatible.

Grunt server does not use virtual host name for my app..vhost and httpd are set up but grunt is not using them

只愿长相守 提交于 2019-11-30 20:54:53
So I am trying to setup my app with a name rather than using 127 0 0 1. Every single time I run grunt, my address is http://127.0.0.1:9000/#/ ... I've tried many things and nothing is working...I always get redirected to that place. Here are my files: httpd.conf <VirtualHost *:80> DocumentRoot "/Users/myusername/Sites/MyApp/app" ServerName myapp.dev <Directory "/Users/myusername/Sites/MyApp/app"> Options FollowSymLinks MultiViews Indexes AllowOverride All Order allow,deny Deny from none Allow from all </Directory> </VirtualHost> hosts 127.0.0.1 myapp.dev ::1 myapp.dev Gruntfile.js // Generated

keycloak apache server configuration with 'Mixed Content' problems

a 夏天 提交于 2019-11-30 20:24:04
have a problems configuring keycloak behind my apache server, Mixed Content: The page at ' https://dev.mydomain.com/auth/admin/master/console/ ' was loaded over HTTPS, but requested an insecure script ' http://dev.mydomain.com/auth/resources/1.7.0.final/admin/keycloak/js/controllers/groups.js '. This request has been blocked; the content must be served over HTTPS. My apache configuration is, ServerName dev.mydomain.com ServerAdmin dev@mydomain.com SSLEngine on SSLCertificateFile /opt/mydomain/domains/dev.mydomain.com/apache/dev.mydomain.com.crt SSLCertificateKeyFile /opt/mydomain/domains/dev

How to set up virtual hosts on Apache 2.2

和自甴很熟 提交于 2019-11-30 15:39:27
Can anyone direct me to a good tutorial on how to set up virtual hosts using Apache 2.2? Here's my situation: I have Apache running on my laptop and I want two websites-- one on port 80 and one on port 8089. I want to access each site from the other computer on my network by entering the computer's IP address, such as http://192.168.1.102 and http://192.168.1.102:8089 . Yet when I enter the second url, it directs me to the website running on port 80. Thanks in advance for any help. Just have 2 virtual hosts defined like this, but with differeing DocumentRoots: <VirtualHost *:80> ServerAdmin