Apache :: URL Rewritten But Still Original One Also Works And Not Redirecting
May 13, 2014RewriteRule ^massaggi-([^/]*)$ /an.php?prov=$1 [L]
View 1 RepliesRewriteRule ^massaggi-([^/]*)$ /an.php?prov=$1 [L]
View 1 RepliesI've been asked to put an Apache Reverse Proxy in place as per guidance from SAP - [URL] - but have come across an issue where the CSS file is not rewritten by the reverse proxy. The below is the Virtual Hosts entry from the test httpd.conf that i'm running to get it working. I'll be moving this to vhosts entries when it eventually works (optimism slowly vanishing! ).
Listen 443
<VirtualHost *:443>
SSLEngine On
SSLProxyEngine On
ProxyRequests Off
ProxyPreserveHost On
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
AllowEncodedSlashes On
SSLCertificateFile /Apache24/conf/FILE.crt
SSLCertificateKeyFile /Apache24/conf/KEYFILE.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
ServerName Gateway.External.co.uk
ProxyPass / http://SAPGateway.Internal:8010/ nocanon
ProxyPassReverse / http://SAPGateway.Internal:8010/
ErrorLog "C:/Apache24/logs/error.log"
TransferLog "C:/Apache24/logs/access.log"
</VirtualHost>
Each post I come across with a similar issue mentions the trailing '/' on the ProxyPass entries, unfortunately - for me - they're there!
I have a custom software that runs it's own webserver. I then found instructions on how to use apache2 as a proxy that will enable ssl for that site. (long story short, my custom software doesn't support ssl and it's not an option)
View 2 Replies View RelatedI have 408 error and put a domain to impersonate the original is blank or rediccionamiento domain to the original. He always says: Time Up and error 408.
127.0.0.1 - - [30/Apr/2013:13:41:41 -0300] "-" 408 -
I own:
- Apache V: 2.4.4 Update 2
- Mod Security V: 2.7.3 Update 2
- Atomic Rules for Mod Security: Update 29/04/2013
- Mod mod_limitipconn V: 0.23.1
- Mod mod_antiloris V: 0.5.2
Do you think it's a bad configuration or a bug in programming? Eh I tried many ways, disabling modules, deactivating and activating settings, etc ...
I have set up Apache as a SSL front end for our web applications deployed in GlassFish Server 3.0.1 Open Source Edition, how can I keep the original URL displayed in the web browser address bar unchanged after redirecting via Rewrite / ProxyPass and ProxyPassReverse
Reference 1:
RewriteEngine On
# If the request URL does not start with a slash (/), prepend it.
RewriteRule ^([^/].*)$ /$1 [E=redirect:y,N]
# If the request URL starts with more than one slash (/), keep only the first one.
RewriteRule ^//+(.*)$ /$1 [E=redirect:y,N]
[Code] .....
I keep hearing that redirecting from http to https is not very secure [non-SSL to SSL]. Among other reasons, one reason is that the browser may continue to think it is communicating with non secure server and may not encrypt the data. Is it true? I hope not, I am using the following -
<VirtualHost 12.34.567.89:80>
ServerName www.mysite1234.com:80
Redirect / https://www.mysite1234.com/
</VirtualHost>
For now I have this
RewriteEngine On
RewriteCond %{http_host} 7eh.net|www.7eh.net
RewriteRule ^/?$ http://www.secretdesignart.com/ [L]
But some folders are redirected.
You can check here:
[URL] .....
Say I have two domains: example.com and example.net.
Upon a http request to example.com, I wish to redirect to https://example.com.
Upon either a http or https request to example.net, I wish to redirect to https://example.com.
Note that for both cases, subdomains should also be redirected, and the change should be considered permanent.
I've seem multiple ways to do so. What is the best way? How do I deal with subdomains when there is a new domain such as example.net to example.com?
I've taken a stab. How to fill in the gaps?
I'm trying to redirect some threads in vbulletin from full version to archive version, I just have some problems and I have not been able to resolve it.
I have the [URL] ...
and I want redirect to: [URL] ....
I have:
Options + FollowSymLinksRewriteEngine onRewriteRule ^showthread.php?([0-9]+)$ archive/index.php/t-$1 [R = 301, L]
I must say that I tried a lot of possibilities but my knowledgment in Apache WS is not too much advanced.
Apache Web Server version: 2.2.22
OS: Centos 6 64 bits
Tomcat version: 7.0.57
What I need to achieve is the following:
I have some plain websites defined this way:
<VirtualHost *:80>
ServerAdmin example1@example1.com
DocumentRoot "/opt/sites/example1/"
ServerName example1.com
ErrorLog logs/example1-error_log
CustomLog logs/example1-access_log common
RedirectMatch permanent ^/(.*) http://www.example1.com/$1
[Code] ....
I have the following Apache redirect code in .htaccess:
RewriteRule ^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$ /domain.com/app/modules/content/latestNews.php?id=$1 [L]
This redirect works fine on Apache 2.2.8, but doesn't work on Apache 1.3.41
The following is the entry from error_log:
RewriteRule: cannot compile regular expression '^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$'
A simple Rewrite is working fine in Apache 1.3, but the above regualar expression doesn't seem to be working on Apache 1.3. Does anyone know whether Apache 1.3 doesn't support it?
I don't know why apache not works you can demo here : [url] Two command i've tested:
- /etc/init.d/httpd status
Quote:
Not Found
The requested URL /server-status was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an
ErrorDocument to handle the request.
_________________________________________________________________
Apache/1.3.37 Server at server.xxx.org Port 80
-/etc/init.d/httpd start
Quote:
/etc/init.d/httpd start: httpd (pid 17885) already running
How to enable apache software .
I am currently running a dev server out of my home. The setup is as follows:
Server is Windows Server 2008.
Apache is running, listening on port 88. On this, I have subversion and TRAC.
IIS is running, listening on default port 80. On this I have an ASP.NET web site that pulls its code from subversion.
Router is a standard Linksys WRT54G.
Router is open as can be, just to test it. Server is in DMZ, all ports are forwarded to its IP (TCP and UDP), etc. This will change, but during setup state, it is what it is.
default.aspx is set up as default document in IIS. Folders are mapped correctly. The file exists in the physical directory it's looking at.
the only site and only Application pool in IIS are for the site in question.
The issue:
Both Apache and IIS work great on my local network.
Both Apache and IIS work great on wireless network.
However, in the wild, WAN works for the apache (port 88) but not IIS. Typing in http://[ip address]:88 or any of the subdirectories works fine. Typing in http://[ip address]/default.aspx returns, in Firefox, "Connection Interrupted -- the connection to the server was reset while the page was loading".
Windows firewall is disabled and unbound from all protocols. As specified, I've opened up the server and router as much as possible temporarily in order to allow me to lock it down again step by step once I have the issue solved.
I am doing my web like this:
1) nginx listening at port 80
2) apache listening at port 78
3) nginx throws all shtml pages to apache
they are working perfectly, except one small thing:
I don't want any public visitor may visit port 78 directly, for now, both:
[url]
[url]
are working for visitors.
Anybody knows how to block/hide port 78 to the public access?
my nginx config snippet:
Code:
location = /index.shtml {
proxy_pass [url]
}
my apache2 config snippet:
Code:
Listen 78
If I make apache as follows:
Code:
Listen 127.0.0.1:78
I will get 502 bad gateway when I visit:
[url]
I am trying to make Apache SSL work on my SAP BO Environment. I have implemented SSL parameters and conf and now when i access:
http://localhost:<portno>/index.html - It Works !!
https://localhost:<sslPortNo>/index.html - It Works !!
BUT, when i try to login to
http://localhost:<portno>/BOE/BI -- It works !!
https://localhost:<sslPortNo>/BOE/BI -- It DOES NOT work.
I found a socket available other than 80 which would not allow me to use. I set it in the conf file as 1800 and then go to apache/bin directory and load httpd.exe. When I go to the browser, I have to type in http://localhost:1800 for it to work once. If I close the browser and try again, or I try a php file, it says it can't find localhost. I have to stop httpd.exe and reload, then it will work once.
Do I have to find a way to use socket 80 for it to work?
My customer wants a Windows system - but I'm rusty at best in Windows.I downloaded VC11 x86 Thread Safe (2013-Nov-13 20:57:44), unpacked it, moved it to it's own directory, edited httpd.conf (no auto installation) and confirmed it was working (localhost/index.html)
I added PHP and ran a PHP info - a little trouble getting the php.ini found.Apache seems to work fine on the local system - either localhost/index.html or nn.nn.nn.nn/.But remote browsers timeout when attempting to connect.
1. I've opened command as administrator and run httpd.exe directly
2. I've installed httpd.exe as a service, opened it's properties window and started it from there
3. Changed the listen port to 8080
4. netstat sees the remote browser with a waiting connection - and the local service
5. The Windows system is on my Mac network (same systems where the remote browser is) and I have transferred megabytes of files between the two systems.
In Component Services - the Apache2.4 service shows Log On As 'Local Service' - I'm guessing it should show as 'Network Service.I tried changing this - used the local user login - restarted the service. I didn't see any way to change it to 'Network Service'. Perhaps this is the problem?
ODDLY - the remote browser worked briefly - then failed with the same 'time out'.I'm guessing this is something simple that I don't understand about Windows - (then again, since I don't understand much about Windows, it could be complicated too).
Why my rules don't work as I want?
I want to make hidden rewrite from url like host.sk/dir/dir2
I have vhost setup for test of a new website. I want to allow access on the localhost, and, from one IP from the Internet (redacted). Apache serves the site just fine on the server but I can't access the site from my the "xxx...." IP.
I'm using a physical path to test from the public IP as follows:
xxx.xxx.xxx.xxx/~user/test/index.html
I have vhost setup for test of a new website. I want to allow access on the localhost, and, from one IP from the Internet (redacted). Apache serves the site just fine on the server but I can't access the site from my the "xxx...." IP.
I'm using a physical path to test from the public IP as follows:
Quote:
http://xxx.xxx.xxx.xxx/~user/test/index.html
Apache v2.2
RHEL6
UserDir configured/running
SuExec configured/running
Below is the relevant vhost block in httpd.conf:
Code:
<VirtualHost *:80>
ServerName test
ServerAlias test
DocumentRoot /home/user/public_html/test
<IfModule mod_fcgid.c>
[Code] .....
I don't have a FQDN as yet, so I just made a entry in /etc/hosts as follows:
Code:
127.0.0.1 test
Here is an excerpt from the Apache error log:
Quote:
[Mon Jun 17 12:02:16 2013] [error] [client xxx.xxx.xxx.xxx] client denied by server configuration: /home/user/public_html/test/index.html
I've checked the firewall and the /etc/hosts.allow- that's not it. I've read the Apache docs and in the vhost block Allow should be evaluated last, and apparently is matching localhost but is not matching my IP.
OS: RHEL 6.4
SELinux: permissive mode
Apache: 2.2, mod_fcgid, mod_suxec, mod_ssl enabled
Common Name: www.user.dept.university.edu
(Note:user names, accounts, organizations etc. sanitized)
why Apache will serve PHP-based web pages over port 80 but not over 443. Here is the virtual host block excerpt from httpd.conf:
Code:
<VirtualHost *:80>
ServerName user.dept.univsersity.edu
ServerAlias user
DocumentRoot /home/user/public_html/subdirectory
<IfModule mod_fcgid.c>
[Code] .....
I can access my web domain by typing...
[url]
But i get no server found error when i type....
www.mysite.com or [url]
I am using LxAdmin Panel, and have added (A) record for www
www A Server IP
I made a mistake that i resized and modified the /tmp directory. Can i have it back from original ? if so, how do i do it ? I'm using CentOs 5 64bit and DirectAdmin.
View 6 Replies View RelatedO/S was corrupt so I had to do a reload on a new drive. I'm trying to mount original drive (already connected as 2nd) but it is not showing up in df -h
Code:
root@server080 [~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 145G 2.5G 135G 2% /
/dev/sda1 99M 12M 83M 12% /boot
none 252M 0 252M 0% /dev/shm
/usr/tmpDSK 485M 11M 449M 3% /tmp
/tmp 485M 11M 449M 3% /var/tmp
/dev/sdb1 99M 12M 83M 12% /backup
root@server080 [~]# e2label /dev/sdb1
/boot1
root@server080 [~]# dumpe2fs /dev/sdb1 | grep -i superblock
dumpe2fs 1.35 (28-Feb-2004)
Primary superblock at 1, Group descriptors at 2-2
Backup superblock at 8193, Group descriptors at 8194-8194
Backup superblock at 24577, Group descriptors at 24578-24578
Backup superblock at 40961, Group descriptors at 40962-40962
Backup superblock at 57345, Group descriptors at 57346-57346
Backup superblock at 73729, Group descriptors at 73730-73730
/etc/fstab shows
Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=SWAP-sda2 swap swap defaults 0 0
/dev/hda /media/cdrom auto pamconsole,exec,noauto,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
I was trying to install some software before I really knew how. I copied some files over to /usr/bin and overwrote
/user/bin/INSTALL
/user/bin/README
/user/bin/PGK-INFO
Do I need those original files back or am I ok?
For VOIP traffic I am thinking of moving some servers from bay area to C4D.
I store all my server boxes so its easy to UPS them.
My question is if i wanted the servers to be shipped back from c4d in case of any reason in future do they keep the original boxes around to ship the servers back?
I'd like to create a forwarding address, and not have the original account keep the mail - but without having to delete the original account, since I'd like to keep my existing emails.
For instance if the old account is apples@domain.com, I'd like to forward new emails to oranges@new.com, where apples doesn't keep the new emails. Currently in cPanel when I create a forwarder apples@domain.com=>oranges@new.com, new emails are sent to both accounts.
We have a server with a fine company, BocaCom. They are who the IP addresses are we use ultimately registered to. It seems we are being blacklisted by secureserver (isn't that Godaddy?) because the IP does not register to us for our outgoing email. It registers to BocaCom.
Is anyone else having this problem, and how to we get around it? We've contacted BocaCom and are waiting for their reply. Is this an IP issue or am I reading the secureserver reply wrong?
----------------
Dear Sir/Madam,
While there is indeed an rDNS record created for 72.35.xx.xx, it does not point back to the original A record. This will need to be updated before we can look further into unblocking the IP.
----------------