New answers tagged

0

I had a similar problem. Turns out that in Apache 2.4 you cannot have the mod_geoip option 'GeoIPScanProxyHeaders' set to 'On' at the same time that 'mod_remoteip' is enabled. 'GeoIPScanProxyHeaders' is a setting for obtaining the client IP address for use by 'mod_geoip'. Instead, 'mod_remoteip' should be preferred and 'mod_geoip' will use the findings of '...


0

It seems probable that our own issues stemmed from our Chef configuration installing httpd, PHP-FPM and PHP itself from two different sources (EPEL vs IUS).


0

I seem not to be able to comment, it seems, but i am guessing wordpress has a separate .htaccess file that contains extra rules in order to make those pages work. I would guess your static pages will need extra explicit rules these can be added to the .htaccess or in the virtualhost but in both cases should look like: RewriteCond %{SCRIPT_FILENAME} !-d ...


-1

This will enable the Rewrite capabilities: RewriteEngine On This checks to make sure the connection is not already HTTPS: RewriteCond %{HTTPS} !=on This rule will redirect users from their original location, to the same: RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] The leading slash is made optional so that this will work either in httpd.conf ...


0

Create a text file with the following code in it and save it as default.aspx in the /feed/ sub-folder in the webroot. <% Response.Redirect("/feed/stories/"); %> Crude, but it works. Sometimes the simplest method is the best. This method produces a 302 (temporary redirect). If you need to do a 301 permanent redirect, here: http://stackoverflow.com/...


0

It sounds like you have a redirect loop, because you keep on adding /amp/ at the end of your request URL. Perhaps you should have a conditional rewrite directive (or two!) instead of a wildcard. -rewrite ^ http://example.com$request_uri/amp/ break; +rewrite ^(.*(?<!/amp))/$ http://example.com$1/amp/ break; +rewrite ^.*(?<!/amp/)$ http://example.com$...


1

I cannot attest whether what you want to do will work, but below is the conversion of your "pseudocode" into actual nginx configuration (and provided that a likewise copy-paste solution was working for you, this should continue working, too). location ~ /(?<anydirectsubdirectory>[^/]+) { index index.php; try_files $uri $uri/ /$...


0

TRY THIS~ server { listen 80; server_name example.com; charset utf-8; access_log logs/xxxxxx.access.log; root /var/www/html; index index.php; location = / { return 301 /cn/; } location / { try_files $uri $uri/ /cn/index.php?q=$uri; } location /en { try_files $uri $uri/ /en/index.php?q=$uri; } location /my { try_files ...


2

Maybe something like this: server { server_name ~^(?<user>\w+)\.(?<site>\w+)\.example\.com$; #Then you can use $user and $site variables in config, e.g.: root /home/$user/sandbox/$site; }


0

in Azure there is a new feature called Azure Domain Services. it is in public preview at the minute. once configured you can join Azure IAAS VMs to Azure Domain services. Azure domain Service has access to all you Azure AD connect synced accounts so your synced users can authenticate against Azure domain Services and the accounts are available to login to ...



Top 50 recent answers are included