Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - clipster

Pages: [1]
1
Installation / Re: How do I execute perl.
« on: July 30, 2015, 01:20:19 AM »
New install of panel but i don't seem to be able to execut perl.

Code simply echos out even though file protection is 755

COde for test.pl

#!usr/bin/perl

print "Enter your name: ";
$name=<STDIN>;
print "Hello, ${name} !";

Don't forget to add at the top of this script before your first print statement:
Code: [Select]
print "content-type text/html\n\n"
Otherwise you'll get 500 server errors

2
I have been into computing ALL MY LIFE... and I'm OLD, Ancient... older than the dirt you walk on in your bare feet.  I was in Radio Shack every week when the first TRS80's came out... playing with basic.
Bought my first trash 80 model 3 for 2500 in 1983.  That, is old.
In the last 20 years I've worked with Plesk (omg), Cpanel (hero status here), and oh boy, watched webmin/virtualmin grow up since I first used it in 99.

I'll tell you, the CentOS Web Panel is the BOMB! For free????  Are you kidding me?  If I owned this project, I'd be charging at least five bucks a download, or at least 40 bucks a year license fee.  That is CHEAP!  They could raise SO MUCH MONEY for this thing, and get it to where it needs to be.

Got an idea... free edition, forum support... just limited to like 3 domains and no funky stuff.
Everything else pay the donald a few bucks.

The entire last week I've been trying to get a basic (ahem free) server up and running on my own (I could do this manually but I hate it), where I could get features offered like cpanel provides, but at the cost of a home based system.  I have tried ehcp, blue onyx, and one other which will remain nameless... and I made those choices based on what their respective websites had to say about them requirements etc... (my judgement sucks I guess). 

I consider myself pretty good with command line ops with linux and understanding the system architecture of web servers, but today I realized how valuable staying 'current' in the server world (of being a server administrator) is.  You want your own server, you need to not only learn but keep up to date.

httpd.conf never bothers me... I was going round and round making special httpd.conf (and domain.conf) workarounds with plesk 10 years ago.   It's easy to do if you understand the heirarchy of processing that apache goes thru once it starts up.  If you work and play with it long enough, you'll learn quick.  root access is a must.  As long as you don't have a critical domain depending on you, then time is on your side.

My specific issue today, was that I was at my wits end with all of the other idiot distro's of free control panel systems, then I just said the heck with it, let's start over and do a centos-webpanel from scratch.

But I'm so sick of installing and waiting waiting waiting for a new full installation on a new box.  It takes forever.  My last install was with blue-onyx... a good control panel, but now you're gonna laugh... I was lazy and had this thing running on a wireless device.  Not a laptop but desktop with wireless usb plug-in thing.

Nothing I could do from the command line would get that stupid thing to work with my e800 router.  So, I had a blue-onyx system with centos 6.x and everything was up to date, and couldn't connect to the internet, no matter what I did.  My only solution, was to install a desktop on top of the blue onyx thing, (brought computer to my desk and did a hard line internet connection with eth0 to do the install).

In the end, I created a new user in addition to root, so that I could login with x-windows to simply point and click and activate the wifi.  With all the other processes running in the background (apache, blah), I figured this would fix it.

But it didn't.  When I did the upgrade on the desktop, it literally wiped out all of the blue onyx everything.... including apache.
(I still do not understand how this could have happend, but httpd no longer existed).

Ok fast forward, I do not want to go through another 're-installation' of any os... there's a better way.  Google was my friend, and I found centos-webpanel about listing number 6 or 7 on the search results...  Ok this thing is designed for Centos and will work with centos 6.

Still couldn't get wifi working, so brought it back in hooked it up to wired... and did the thing.  What surprised me the most... was that the installation (even though I had x-windows working), went PERFECTLY.  Centos-Webpanel installer looked at what I had and actually upgraded the stuff that needed upgrading, and installed what it needed.

Because I got x windows running and was able to enable wifi (without the command line), I left it on wifi while it was doing all of this.  Jeez... this control panel took almost an hour to install, but dang it.. IT WORKED!!!!!

I got my web panel, I got my wireless server sitting in the garage FINALLY, and I could even use mod_userdir... but perl didn't work.  (I'm a perl guy).  Lots of playing around found that apache foundation incorporated mod_cgi into the core, and module load directives with this version of apache will cause httpd restarts to fail.  crap why not just ignore them instead of quitting?  This was not centos-webpanel people fault, this is apache people fault.

Even if you go to apache.org pages for 2.2... they will tell you you need to include module directives in httpd.conf.... that are now obsolete.  I had to insert invalid configuration directives JUST to get the right answer on this (lol I FINALLY got a response from the server that said that MOD_CGI was included with this version of apache!!!!!)... which leads me to the next discussion, how do you know what's wrong with your server if you don't know what to ask?

OMG REALLY?  10 hours just to figure out WHY my perl scripts either:
1. Gave me prohibited response,
2. Printed the script.

So, logically thinking... This is apache.  What does apache want to see, to enable cgi-bn/.pl/.cgi to operate?

From apache.org, this is bs...
https://httpd.apache.org/docs/2.2/howto/cgi.html

Code: [Select]
In order to get your CGI programs to work properly, you'll need to have Apache configured to permit CGI execution. There are several ways to do this.
Note: If Apache has been built with shared module support you need to ensure that the module is loaded; in your httpd.conf you need to make sure the LoadModule directive has not been commented out. A correctly configured directive may look like this:

LoadModule cgi_module modules/mod_cgi.so


There is NO mod_cgi.so on this version of apache 2.2 freaking X.
It is Included with apache.  Somebody point me to this info.  No... nevermind, I'm like the rest of the world, you configure a server once, use it for 3-5 years, then move to another host or whatever it is you do.  I haven't dealt with this stuff since 2008.

So I'm down another completely different rabbit hole, apache config (httpd.conf and all the included files).

One small thingy needed to be done with this centos-webpanel configuration, and that is adding this to
/usr/local/apache/conf/extra/httpd-user-dir.conf at the end of the file.

<Directory /home/*/public_html/cgi-bin>
        Options ExecCGI SymLinksIfOwnerMatch
        SetHandler cgi-script
</Directory>

In the last 72 hours I have learned more about current apache configs than I care to know.  It took that long to go from nothing to a really cool server with website management... of course, this one I'll probably have to migrate from to another commercial server in the next 6 months, but the experience was worth it.

Great job and kudo's to the staff at centos-webpanel.  I love this thing.  I know nobody these days cares about the perl things that I do, but if this post and my other one helps someone, then more power to all.

Take care all.









3
Installation / Re: How do I execute perl.
« on: July 29, 2015, 11:58:56 PM »
lol... oh I see, it's 11PM server time, not 8pm... so the cwp forum is hosted in the middle of the atlantic ocean.  I like it.
At least my cp works great as well as my domains, (hosted dev-env in my home network).
Thanks for looking!

4
Installation / Re: How do I execute perl.
« on: July 29, 2015, 11:55:50 PM »
WHOOPS!!!
No.... do not add that before the last </directory>,
add it AFTER the last </directory>

<Directory /home/*/public_html/cgi-bin>
        Options ExecCGI SymLinksIfOwnerMatch
        SetHandler cgi-script
</Directory>

sorry folks, beer wednesday, btw, what's up with the forum time anyway?  It says I'm posting at like 11 something, but it's almost 8pm here on the east coast.  You guys that host this thing in Siberia?  Oh well, good job.

5
Installation / Re: How do I execute perl.
« on: July 29, 2015, 11:52:07 PM »
Perl execute problem solved.

Instead of doing a configuration change on the domain.conf files or virtual whatever, I did the thingy on:

/usr/local/apache/conf/extra/httpd-userdir.conf

This one (httpd-userdir.conf) is not updated or modded by any of the cwp scripts that I know of, (I went thru multiple cp checks on rebuilding blah blah, couldn't find any script that changed that one file).

Code: [Select]
<Directory /home/*/public_html/cgi-bin>
        Options ExecCGI SymLinksIfOwnerMatch
        SetHandler cgi-script
</Directory>

Just add that at the bottom (before </directory>) and your perl scripts should work just dandy.

Ok all you CWP boyz... you need to add this little bittie thingy to your installation templates.
Thanks for an awesome control panel.

tags: perl script print mod_cgi centos web control panel won't execute apache 2.2 (all hail google).

6
Installation / Re: How do I execute perl.
« on: July 29, 2015, 11:22:14 PM »
working on this still...
turns out mod_cgi is included in apache version 2.27.
Code: [Select]
Starting httpd: httpd: Syntax error on line 414 of /usr/local/apache/conf/httpd.conf: module cgi_module is built-in and can't be loaded
That's why I can't find a specific mod_cgi.so file.

More to follow.  (I'm pretty sure this has to do with a <directory> config error.

7
Installation / Re: How do I execute perl.
« on: July 29, 2015, 10:02:41 PM »
Did you ever figure this out?
I just installed a cwp today and while apache works, there is no mod_cgi... so, no perl for httpd...


Pages: [1]