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?
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.
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"?
We're running a departmental intranet site on Apache 2.2 (on Windows Server 2003, if that matters). I'm trying to figure out how to post exe files on the web site so I can create a link and users can download the programs.trying various changes to my httpd.conf file, but no matter what I tried I get a 403 Forbidden error and the error.log file shows an error "Options ExecCGI is off in this directory:...".
1) I've tried putting the EXE in various folders. 2) I don't have a .htaccess file and I don't see anything in the httpd.conf file that seems to specifically relate to access for this file type. 3) If I put a zip file in the same folders, I am able to download or open it. 4) The httpd.conf file should be whatever was created when we installed Apache.
I'm trying to get setup with Apache 2.2, and did just fine on one server but the second one is giving me some troubles. I'm having an issue with some sites wanting to download instead of display. Does this ring any bells with anyone right off?
httpd.conf appears to be okay as far as I can see, but obviously something is not quite right somewhere.
The problem is that HTTP file download speed is nearly 10 times lower than FTP download speed. What could be limiting it? It's about 7Mb for FTP and 70-100Kb for HTTP. Strangely, download speed is OK when browsing from the server itself (e.g. via RDP)
After downloading httpd-2.2.29-win32.zip and generating SHA1 and SHA256 checksums from the file, they do not match the checksums posted on the download page.
Any programs you recommend for monitoring? I am looking for something to add to keep an eye on my servers in addition to the third party services I am already using. Does not matter if it is linux or windows based.
I was curious to know if there's a way to protect memory for certain programs. I have a VPS that is fairly light on memory, and there's been a few occasions when a program/bug will go wild and eat up all the memory locking me out of ssh/webmin.
Is there any way I can protect certain memory for certain processes/programs. Ideally I'd like some way for ssh to stay up in all situations.
I'm in the process of setting up a Windows VPS and I was wondering what FTP program you're using on your server?
Doing a quick search on Google I see there's a couple of free options available like Cesar FTP and FileZilla, but I would love to hear some recommendations and any advise on which ones I should stay away from (IE installation problems etc)
I know I could use the FTP client provided in IIS 6, but I would prefer to use something with more control and options.
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
//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>"; }
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
//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>"; } }
I am planning to create a hosting directory really soon and sign up affiliate accounts of the most popular hosting providers. What recommendations could you provide me with to make visitors become interested in ordering hosting from my website?
what I'd like to do is get a server set up that i could remote into and play games such as second life.And Leave it running etc. I would also like to be able to install other software on the server and run them just as i do with my home pc. Is that possible ? and if so what kind of setup do you suggest? Linux,windows.
I have a program that creates a new file each time someone (or somebot) accesses the page and stores these files in a specific directory on my server. I would like to delete these files once a week so I would schedule it as a cron job, but I can't find a program that will actually delete files from the server in a directory I specify. I have found some programs but they all require that the files to be deleted use a specific name and the files I want to delete have long random names. Does anyone have a recommendation for a small program like this?
I was wondering if there are affiliate programs that pay for referrals to free hosting sites? Preferably free hosting sites that would allow flash content.
I am trying to add new programs to the CHROOTED environment via this post: URL....I downloaded the following file URL...., but it has errors. After adding execute permissions, the linux file will not run (errors posted below). I believe there is invalid formatting in the document. I have tried to correct it myself by removing unnecessary characters, but I am unable to get it working.update the file or attach a new copy to this message?
: command not found line 1: : command not found line 3: ): No such file or directorywarning: setlocale: LC_ALL: cannot change locale (POSIX ): No such file or directorywarning: setlocale: LC_ALL: cannot change locale (POSIX : command not found line 6: ./chroot_update.sh: line 14: syntax error near unexpected token `elif' '/chroot_update.sh: line 14: `elif [ -f /etc/debian_version ]; then
Having problems with failed daily domain backups. All databases that have been created by Plesk cannot be backed up, thus backup fails with the following message:
I'm not been able to start plesk although web and mail services are running.I'm getting the error unable to execute php_handlers_control.I've patched and updated plesk with command line and bootstrap repair and I'm getting this errors:
Errors occured in mail restore procedure Some utilities have exited with errors: /usr/lib64/plesk-9.0/mail_auth_dump /usr/lib64/plesk-9.0/mail_responder_restore
When I open my site in a browser and I point the URL to specifically // ipaddress / location A it's all good. (Apache Server)..My problem is, if you open the site in a browser with just the IP address alone it goes there for a second and then automaticlly goes to and opens the other site in location // ipaddress / location B.
However, what I need it to do, I think, is edit the apache conf file to make it open location A as the default. What do I need to do in the apache (httpd-conf) to fix that? For that matter is that the right file to edit?
Im using AJAX on my site and i need to access a seperate server instance on a different port. AJAX wont allow me to do that so i want to use Apache as a proxy but only for one page.
I been using plesk, and cpanel so this is the first time I have Webmin for my CentOS.
After some googling and reading, i able to install apache, mysqld and vsftpd (for some reason, my host (hivelocity) didnt install these. So this is my setup.
a.com: in godaddy, i add nameserver host as ns1.a.com and ns2.a.com and change the dns to point to that
b.com: in godday, point dns to ns1.a.com and ns2.a.com BIND DNS Server
========================
I create two master zone for a.com and b.com a.com
Code:
$ttl 38400 a.com. IN SOA server.a.com. abc.yahoo.com. ( 1226206691 10800 3600 604800 38400 ) a.com. IN A 1.2.3.4 server.a.com. IN A 1.2.3.4 a.com. IN NS server.a.com. mail.a.com. IN A 1.2.3.4 ftp.a.com. IN CNAME a.com. www.a.com. IN CNAME a.com. a.com. IN MX 10 mail.a.com. b.com Code: $ttl 38400 b.com. IN SOA server.a.com. abc.yahoo.com. ( 1226206691 10800 3600 604800 38400 ) b.com. IN A 1.2.3.4 server.a.com. IN A 1.2.3.4 b.com. IN NS server.a.com. mail.b.com. IN A 1.2.3.4 ftp.b.com. IN CNAME b.com. www.b.com. IN CNAME b.com. b.com. IN MX 10 mail.b.com.
APACHE
========================
I created 2 virtual servers for a.com and b.com /home/sites/a.com/html /home/sites/b.com/html
I create an index.php in a.com/html with content: "a.com YEAH"
I create an index.php in b.com/html with content: "b.com YEAH"
After wait for dns to propogated,
when i try to go to a.com, content "a.com YEAH" shows up.
But when goto b.com, content "a.com YEAH" shows up? Why?
Also, when goto ns1.a.com, content "a.com YEAH" is there.
I also has problem with vsftpd but let fix that later.