Apache :: Execute Script When GET Request Come On Server

Aug 30, 2013

If any GET request are coming on Apache I want execute my "try.pl". I used "Script" directive for execute script "Script GET /cgi-bin/try.pl ....

View 2 Replies


ADVERTISEMENT

Setup Apache HTTP Server 2.0 To Run On Local Machine And Execute PL Scripts

Jan 24, 2014

I am 3 days new to figuring out how to get Perl scripts to run on my Windows XP box. I downloaded and installed the Apache installation file "httpd-2.0.65-win32-x86-openssl-0.9.8y.msi" and the "strawberry-perl-5.18.2.1-32bit.msi" from the perl.org site in hopes that I could get a feedback form to work for a web site that I am working on.

Out of the many pages that I have viewed online of how to configure the Apache Server, nothing has given any favorable results with their explanations.

My last attempt was [URL] ..... where I could not get the example to work. I did the changes to the Apache file "Edit the Apache httpd.conf Configuration File" fairly easily but I must be having problems with the test.pl because I can't get it to work.

I used a different version of Perl (Strawbery from perl.org because it installed without giving me an error pop up after installation) and after copy pasting the script, in an attempt to get it working, I ended up changing it in hopes that I could get it working, shown below.

#!/strawberry/bin/perl.exe
print "Content-type: text/html; charset=iso-8859-1

";
print "<phtml>";
print "<body>";
print "Test Page";
print "</body>";
print "</html>";

This is what the site says to create the program with:

#!/perl/bin/perl
print "Content-type: text/html; charset=iso-8859-1

";
print "<phtml>";
print "<body>";
print "Test Page";
print "</body>";
print "</html>";

where I assumed that "#!" meant the "C:" drive and substituted the first "/perl" with the folder the Strawbery Perl had installed itself to and left the second "/perl" in the first line thinking that it was referring to the executable in the "C:strawberryperlbin" folder.

This is the error I get when trying to get the script to run when typing "localhost/test.pl" in the address bar.

"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
........"

Know how I can change the title of this post to read "Configuring Apache HTTP Server 2.0 to run Perl in Windows"?

View 1 Replies View Related

Apache :: How To Setup Exe Programs To Execute Instead Of Download

May 9, 2013

I am migrating to apache httpd 2.4 on windows xp. The current server currently has exe programs that execute as cgi programs. When I try to use one of these links, apache just servers the programs as files for download. How do I configure my httpd.conf to run these instead of download them?

View 1 Replies View Related

Apache :: Which MPM Used For Request Server By Default

Feb 3, 2014

I have question for apache in centos. I loaded the apache and I want to know that which MPM used by default two MPM defined in apache but which MPM apache actually used for request server.

<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256

[Code] ....

View 6 Replies View Related

Apache :: Cannot Get Server To Respond To HTTP Request

May 6, 2013

I have an Xitami server and am migrating to apache httpd. I have the regular server working fine. I tried configuring ssl, but no requests are coming through. I know 443 is open on the router because it works fine under Xitami. I checked the logs and it si starting fine. I am attaching my httpd.conf and the startup log. If I try to access the website using https, it just times out and nothing goes in the log file. I replaced my domain with domain.com. I have tried many different examples, but cannot get it to work and am not sure what to do.

View 5 Replies View Related

Apache Request Is Full

Dec 6, 2008

when i check apache status, i see one domain send many request to server, for example:
domain.com 10.20.30.40
domain.com 10.20.30.40
domain.com 10.20.30.40
domain.com 10.20.30.40
domain.com 10.20.30.40
-
-
-
how can i prevent this problem?
this problem tease me and my server, because induce apache to work unremitting.
Ram Usage is: 65%!

View 5 Replies View Related

Apache :: Arduino UNO - Can't See Request In Log

May 12, 2015

I am working with XAMPP 5.6.8 (Apache 2.4.4, MySQL 5.5.32 and PHP 5.6.8 ) on a 64 bits Windows 7 Ultimate (Service Pack 1) Operating System.

I am working with an Arduino UNO and a WIFI Shield connected to the Apache server.

I am sure Arduino is connected to the WiFi network and to the server, and it also sends the GET request to the server.

Apparently, everything is OK because I can see the 200 OK message from the server in the Arduino serial monitor, but I find no trace of that request in the server log although all the requests made from the browser (by typewriting the server address in the browser address bar and pressing enter) appear in the server log.

View 6 Replies View Related

Apache Handles Every Request 3 Times

Oct 21, 2007

New VPS, CentOS 4.5, Apache 2.0.52, Plesk 8.2.

Every request is getting processed 3 times. In other words, if I point my browser to the URL of an image hosted on this server, it generates 3 lines in the access log each time I refresh the page.

If I point it to a script which logs something to a file, it logs it 3 times, showing it's run all 3 times.

I haven't touched the httpd.conf or any other configuration. Any idea what could cause this?

View 4 Replies View Related

Apache Error Log Analyzer Request

Jan 17, 2007

Is there any tool out there (I prefer command line) that is especially for analysis of apache error log files ? I need something that can summarize information from log and give them back to me.

View 0 Replies View Related

Apache :: 413 Request Entity Too Large

May 22, 2015

My site is hosted in shared hosting.

Whenever I try to upload text using form It is showing me '413 - request entity too large'

I have uploaded the screenshot of the problem so that you can view the problem i details.

View 1 Replies View Related

Apache :: Rewrite Wrong Request

Nov 13, 2013

In my web site I have several index pages in different languages in the following format

[URL] ....

Two days ago I noticed increased, many times. Google bot activity on my site and when I checked my log file I found that all pages crawled were wrong web addresses: to the above index were added existing files from my site like

/folder1/folder2/file.html

So, the strings looked like

[URL] ....

And surprisingly all they returned code "200".

My question is: is there any way to rewrite such requests to the first ".html" found in the string.

View 2 Replies View Related

Apache :: Forward Request To JBoss (SSL)

May 31, 2015

I have following components configured.

LoadBalancer, Apache and SSL enabled JBoss.

Lodbalancer URL ....

Apache URL ...

Jboss URL (SSL) ...

When the request comes to Loadbalancer, it is forwarding the request fine to apache.

But from apache I am not able to forward the request to Jboss(SSL)

I am using below settings on httpd.conf file of apache but url is getting changed to [URL] .... from [URL] ...

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://servername:8443/EPC [R,L]

I still want the generic name (emsprod.com) to be displayed on url instead of server name.

How I can successfully forward the request to Jboss when I access LB url.

View 3 Replies View Related

Apache :: Add Www To Domain Unless It Is A Subdomain Request

Nov 18, 2014

I would like to rewrite mysite.com to www.mysite.com.

However, if the request is a subdomain (i.e. blabla.mysite.com), then it should not rewrite.

I believe this gets me close, but it will not differentiate the subdomains (i.e., blabla.mysite.com).

View 5 Replies View Related

Apache :: All Request Redirect To HTTPS

Nov 1, 2014

I've just joined the group and new to Apache/php. I have just assembled a website in Joomla/vertumart and called petslovezone.com.au. I want to redirect all the request such as

1. http://xyz.com to https://xyz.com
2. http://www.xyz.com to https://xyz.com
3. xyz.com. to https://xyz.com
4. www.xyz.com to https://xyz.com

now know I have to change .htaccess "RewriteEngine On" section. What would be the best code to do all the above.

Apache Version2.4.10
PHP Version5.4.32

View 2 Replies View Related

Apache :: How To Differentiate Between Request From Mobile And Web

Jul 4, 2014

As we are planning to implement Mobile for our platform, we want to distinguish between request coming from Mobile and Web in Apache. We will be using Apache for Reverse Proxy and we want it to differentiate the request source and forward it to required destination.Is this possible ?

View 1 Replies View Related

Apache :: Invalid URI In Request Ntity, Trailers

Jun 17, 2008

in my apache server error logs:

[Sun Jun 15 20:26:18 2008] [error] [client xx.xx.xx.xx] Invalid URI in request ntity, trailers

[Sun Jun 15 20:42:44 2008] [error] [client xx.xx.xx.xx] request failed: erroneous characters after protocol string: gzip, $

[Sun Jun 15 22:34:05 2008] [error] [client xx.xx.xx.xx] client sent HTTP/1.1 request without hostname (see RFC2616 section$

[ Jun 14 11:27:23 2008] [error] [client xx.xxx.xx.xx] Invalid URI in request rset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

[Fri Jun 13 12:15:12 2008] [error] [client xx.xx.xx.xx] request failed: error reading the headers

View 0 Replies View Related

Hardcode APACHE To Deny Request To Particular Domain

May 28, 2008

I am seeking a solution such that the apache vs 2 denies php or allowing requests out of the server to say domain abc.com and its entire IP block.

I have done so far is used apf -d abc.com to deny outgoing and incoming requests and the php pages (proxies) cannot access the site anymore).

But what i want it something hardcoded into apache itself so it blocks all php based request going off the server to that domain.

How can i go about it?

using centos5 apache 2 and cpanel!

View 2 Replies View Related

Limit Apache (thread) Connections Per Request

Jan 9, 2007

I've been having trouble the past few days with someone who's been "attacking" my site so to speak by continuously downloading very large files with as many connections as (he) can open. I operate a large downloads site for computer games, this person has selected the largest files (like 400-500MB). Not sure of the real intent other than to clog up my bandwidth capacity. Also he appears to be using proxies since as soon as I ban one, another shows up seeminly from China.

Anyway, I have mod_bw and I've limited the number of connections in the downloads area to 2. While that works ok, his tool uses threads like a download manager would and he's using up 30-40 child threads for his 2 file downloads.

So 2 questions,

Is there anyway to not only limit file downloads to 2, but limit the number of connections per request? Many of my visitors do use download managers and I'd like for them to continue using them but use a reasonable number of threads like 6 or 8, but not 30.

Also, is there a way to restrict access to someone using a proxy?

View 2 Replies View Related

Apache :: Periodic Request Timed-out Warnings

Sep 21, 2013

So I've set everything up manually a few times before now, but I got so bored of configuring everything for a manual install I just said screw it and used XAMPP this time - so my circumstances are not completely ideal.

Basically what I am looking to find out is how to improve loading speeds for Apache, PHP and MySQL on my dedi server?

The server I have is of the following spec:
Intel Xeon CPU E5-1650 V2 (3.50Ghz with 12 cores total)
64 GB DDR3 ECC
2 x 2TB SATA3 (RAID 0/1)

use Windows Web 2008 R2 so only 32GB of the RAM is usable.

With all the abive aside, here is the important part: Whilst people are browsing the websites I have configured they are random hit with a blank white page saying "Your request has timed out. Please retry the request." - I have about 100 unique hits daily and a lot of people report the same problem, and I have even had it myself.

It feels as if the server has much more power than Apache and co. is trying to utilize - what can I do?

View 4 Replies View Related

Apache :: Remove Cookie From Request Header

Dec 11, 2014

I am using 2.2.29 in Windows.Trying to remove one cookie in a request header before passing the request to the application, but having trouble. The cookie is in the middle of the request header.

View 1 Replies View Related

Apache :: Redirect HTTP And Www Request To HTTPS

Dec 18, 2013

i want to redirect main domain http //, www request to https://

i added this code

RewriteCond %{HTTPS} off# First rewrite to HTTPS:# Don't put www. here. If it is already there it will be included, if not# the subsequent rule will catch it.RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]# Now, rewrite any request to the wrong domain to use www.RewriteCond %{HTTP_HOST} !^www.RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

View 2 Replies View Related

Apache Restarts After Client Send Request With No Header

Jul 14, 2008

I have a client who's Apache on a CPanel based VPS keep's restarting.

In the error log we recieve two of these lines

"client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFin "

Then the Apache will restart.

I have looked around and found some threads about this problem, but none explaining how to fix this.

View 4 Replies View Related

Apache :: Serve XML File As Response For Appropriate Request When Web Service Is Down

May 30, 2013

I am using the latest version of Apache on an Windows XP machine

When my web service is down for maintenance, since Apache is will still be up and running, I would like for Apache to serve an xml file as a response for the appropriate request. I have three operations available, makePayment, calculateFee, and voidPayment.

Is it possible to have Apache determine what type of request is made for example if I have an xml error page for each operation; how will Apache know which xml file to serve based on the operation request from the client

To make it more clear: What is the best practice for modifying apache to know what request is being made in order to serve the appropriate xml file?

View 1 Replies View Related

Apache :: Seemingly Legit Requests Generating 400 Bad Request Errors

Feb 8, 2015

So I've got a problem where a small percentage of incoming requests are resulting in "400 bad request" errors and I could really use some input. At first I thought they were just caused by malicious spiders, scrapers, etc. but they seem to be legitimate requests.

I'm running Apache 2.2.15 and mod_perl2.

The first thing I did was turn on mod_logio and interestingly enough, for every request where this happens the request headers are between 8000-9000 bytes, whereas with most requests it's under 1000. Hmm.

There are a lot of cookies being set, and it's happening across all browsers and operating systems, so I assumed it had to be related to bad or "corrupted" cookies somehow - but it's not.

I added "%{Cookie}i" to my LogFormat directive hoping that would provide some clues, but as it turns out half the time the 400 error is returned the client doesn't even have a cookie. Darn.

Next I fired up mod_log_forensic hoping to be able to see ALL the request headers, but as luck would have it nothing is logged when it happens. I guess Apache is returning the 400 error before the forensic module gets to do its logging?

By the way, when this happens I see this in the error log:

request failed: error reading the headers

To me this says Apache doesn't like something about the raw incoming request, rather than a problem with our rewriting, etc. Or am I misunderstanding the error?

I'm at a loss where to go from here. Is there some other way that I can easily see all the request headers? I feel like that's the only thing that will possibly provide a clue as to what's going on.

View 1 Replies View Related

Apache Under Attack :: Configured Request Variable Value Length Limit Exceeded

Apr 21, 2008

My server was unstable at this month sometimes fork 700 process and apache 80 access per second and that's made server very slow . very bad browsing

when i checked log files /var/log/messages found that errors

Apr 20 04:06:28 suhosin[798]: ALERT - configured request variable value length limit exceeded - dropped variable 'message' (attacker '212.107.116.238', file '/usr/local/cpanel/cgi-sys/php4')
Apr 22 00:27:05 suhosin[15442]: ALERT - configured request variable name length limit exceeded - dropped ....

View 6 Replies View Related

Execute Cgi On Lxadmin Setup

Feb 2, 2008

I'm trying to get a Movable Type installation working. Centos under HyperVM and Lxadmin...

Correct Perl version is installed. Cgi script in MT calls correct Perl install.

Perhaps it's an issue that I'm running through Lxadmin?

I run through the install - no problem. But when trying to access my install, I get a 500 error.

I'm not getting anything in the logs. Absolutely nothing on the Six Apart side.

SElinux in not running. I've tried forcing with .htaccess:
<Directory /path-to-movabletype>
Options Indexes ExecCGI
</Directory>

Has anyone been through this... or perhaps just some feedback.

It's a common problem - but the solution isn't typical apparently (for me that is).
[url]

View 1 Replies View Related

How To Execute Shell Scripts As Some User

Nov 18, 2007

I'm trying to write some scripts that automate the installation of a website with a content management system. This includes creating domains, installing databases etc via plesk API.

Now we have it creating the domains and databases via plesk, this is not the issue. It's permission problems issuing commands on the server.

I need to have the script install the cms and this requires writing files to a folder on the server owned by a user which is created with the domain.

e.g.
user creates timsdomain.com with ftp user name tim
Plesk makes directory on webserver called ~/vhosts/timsdomain.com/
inside this directory is a folder called httpdocs.
All the files within this folder are owned by tim.

Now my script (running as 'apache' in a folder owned by 'admin') needs to write/edit files to this directory as the user tim (or whatever user was created when the domain was set up).

How can I do this from a php script?

My idea would be to log in as the new user and then start issuing commands but I don't know how to login a user from a script.

I've tried exec, exec_shell etc
trying to log in via script as the new user using sudo/su/suid etc but they all ask for a password (for obvious reasons) but I cannot see a way to send the password to the command with the script. Ssh?

Here's some pseudocode that demonstrates what I'm trying to do, if you can think of a better way I'm all ears.

Code:
//User Fills in CMS/Domain information which becomes Form_Data

//uses plesk to create blank domain, create email addresses and empty database
Make_Domain(Form_Data) {
Plesk = Get_Plesk_Object();
Plesk.Create_Domain();
Plesk.Create_Database();
Build_CMS(Form_Data);
}

//HERE IS WHERE I AM HAVING TROUBLE: I can't figure out how to change the user so I can install files to a
// different directory other than the current user's directory (admin)

Build_CMS(Form_Data) {

change_to_user(Form_Data.ftp_username, FormData.ftp_password);
unpack_CMS_archive_into(user_directory); //eg unpack cms.tar into 'timsdomain.com' (if the above command didn't switch the current directory to users home directory)

//initialises CMS config files and installs CMS data to database
Run_Install_Scripts_On_Server(Form_Data);
//albeit complex, most important part of script
Confirm_Tim_Is_Awesome();
}

Confirm_Tim_Is_Awesome() {
while (getTim().has_moustache()) {
echo "<em>You're still awesome. </em>";
}

View 14 Replies View Related

Execute Commands From Script As Some User

Nov 15, 2007

I'm trying to write some scripts that automate the installation of a website with a content management system. This includes creating domains, installing databases etc via plesk API.

Now we have it creating the domains and databases via plesk, this is not the issue. It's permission problems issuing commands on the server.

I need to have the script install the cms and this requires writing files to a folder on the server owned by a user which is created with the domain.

e.g.
user creates timsdomain.com with ftp user name tim
Plesk makes directory on webserver called ~/vhosts/timsdomain.com/
inside this directory is a folder called httpdocs.
All the files within this folder are owned by tim.

Now my script (running as 'apache' in a folder owned by 'admin') needs to write/edit files to this directory as the user tim (or whatever user was created when the domain was set up).

How can I do this from a php script?

My idea would be to log in as the new user and then start issuing commands but I don't know how to login a user from a script.

I've tried exec, exec_shell etc
trying to log in via script as the new user using sudo/su/suid etc but they all ask for a password (for obvious reasons) but I cannot see a way to send the password to the command with the script. Ssh?
I don't know. Help

Here's some pseudocode that demonstrates what I'm trying to do, if you can think of a better way I'm all ears.

Code:

//User Fills in CMS/Domain information which becomes Form_Data

//uses plesk to create blank domain, create email addresses and empty database
Make_Domain(Form_Data) {
Plesk = Get_Plesk_Object();
Plesk.Create_Domain();
Plesk.Create_Database();
Build_CMS(Form_Data);
}

//HERE IS WHERE I AM HAVING TROUBLE: I can't figure out how to change the user so I can install files to a
// different directory other than the current user's directory (admin)

Build_CMS(Form_Data) {

change_to_user(Form_Data.ftp_username, FormData.ftp_password);
unpack_CMS_archive_into(user_directory); //eg unpack cms.tar into 'timsdomain.com' (if the above command didn't switch the current directory to users home directory)

//initialises CMS config files and installs CMS data to database
Run_Install_Scripts_On_Server(Form_Data);
//albeit complex, most important part of script
Confirm_Tim_Is_Awesome();
}

Confirm_Tim_Is_Awesome() {
while (getTim().has_moustache()) {
echo "<em>You're still awesome. </em>";
}
}

View 2 Replies View Related

Top LA Server Request

May 4, 2009

I couldnt find my past forum post regarding a good service from LA to Australia.
Mainly, Im looking for a LA service which will provide me with super times to melbourne australia. I need a company which is small and that can provide me with fast support and great speeds.

I dont really want a big company.

View 4 Replies View Related

Apache :: How To Use Virtual Host IP Address In Request To Remote Address

Feb 6, 2015

My customer has an external facing Apache server that is acting as a reverse proxy to two internal applications. They have:

- external addresses for each app which resolve to different ip addresses, so app1.their_domain.com and app2.their_domain.com resolve to 77.3.170.10 and 77.3.170.11 respectively.
- the Apache server has two network interfaces with ip addresses 192.168.10.10 and 192.168.10.11
- the external ip addresses resolve to the above internal addresses
- the firewall between the Apache server and the internal app servers is configured to allow traffic from 192.168.10.10 to reach app_server1, and traffic from 192.168.10.11 to reach app_server2, both using port 7777.

I have configured a virtual host in httpd.conf for each ip, i.e.

Code:

<VirtualHost 192.168.10.10:80>
...
ProxyPass /app http://app_server1:7777/app
ProxyPassReverse /app http://app_server1:7777/app
RewriteRule ^/$ /app/app1 [R,L]
...
<VirtualHost>

and

Code:

<VirtualHost 192.168.10.11:80>
...
ProxyPass /app http://app_server2:7777/app
ProxyPassReverse /app http://app_server2:7777/app
RewriteRule ^/$ /app/app2 [R,L]
...
<VirtualHost>

This works fine in that the external address are being routed to the correct application, however the firewall is blocking requests to the second app as it appears the requests are coming from the Apache servers 'primary' ip address 192.168.10.10 instead of 192.168.10.11.

Is it possible to send requests using the ip address from the relevant VirtualHost?

Windows server 2008
Apache 2.2

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved