LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-26-2007, 09:03 AM   #1
firedancer
Member
 
Registered: Apr 2007
Posts: 146

Rep: Reputation: 15
Question Howto enable php scipts to run only for certain website on homeserver


Hi, after follwowing a howto on setting up my debian etch server , php is not set on "global", because in the howto they followed with ISPConfig to specify the sites where php is enabled
I'm not going to install ISPConfig, is there a way i can make php scripts run on a certain site on my server, should be possible rite, a script or so

if not ,where is the configuration file to set it back on "global", which is kind of risky for a noob like me, i don't want to be cracked,hacked,jacked ,before having learned anything. that's wahy i'm taking it step by step and from the bottom.
in which directory do i put a bash script i made as to run as a webpage in the /www rite ?
two more questions : is gnump3 good if i want to stream music from my headless debian server as well, other alternatives maybe
no ,that was it . thnx in advance firedancer

___________________________________
Proud to be a linux user

Last edited by firedancer; 10-26-2007 at 09:16 AM.
 
Old 10-28-2007, 12:36 PM   #2
firedancer
Member
 
Registered: Apr 2007
Posts: 146

Original Poster
Rep: Reputation: 15
Oh yeah, php.ini to change the settings
but can anyone help with some advice, i'll read more and post a real questions later
 
Old 10-29-2007, 03:02 PM   #3
firedancer
Member
 
Registered: Apr 2007
Posts: 146

Original Poster
Rep: Reputation: 15
Oh no , ok i found it (dum(me) ,yes in cgi bin ,brrr ,how come i ask such a question, i know that

i set some iptables rules , no i don't have a specific program , so i do it manually, but how do i precisely get it to start automatticcally at boot time, otherwise i need do set it everytime i restart the server

and a tip ., i'll go to read the man pages now , the periodic croncheck , is there a command stop it or in the background , while iconfiguring settings on the server , i read it somewhere was going to check it, but can't find it now, in the meanwhile a fast hint ,


 
Old 10-30-2007, 09:11 AM   #4
firedancer
Member
 
Registered: Apr 2007
Posts: 146

Original Poster
Rep: Reputation: 15
how do i get my iptables rules to start at boot time
make a file and add line in init.d ?
i'm not sure , can't find the rite info now, aargh

googling got me dizzy
 
Old 10-30-2007, 10:23 AM   #5
this213
Member
 
Registered: Dec 2001
Location: ./
Distribution: Fedora, CentOS, RHEL, Gentoo
Posts: 167

Rep: Reputation: 34
the command "iptables-save" will save all of your current rules. Even so, I'll usually just call the script from /etc/rc.local
 
Old 10-30-2007, 04:56 PM   #6
firedancer
Member
 
Registered: Apr 2007
Posts: 146

Original Poster
Rep: Reputation: 15
Yeah the rules i set are saved, just not able to automatically start it at boot yet,
followed some thingy , which gives me an error , but i'm on my way

still not able to fetchmaill mutt/exim4/fetchmail/...

i send myself some binary file in y user mail ???????
output :
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

sorry, gone
 
Old 10-30-2007, 07:57 PM   #7
firedancer
Member
 
Registered: Apr 2007
Posts: 146

Original Poster
Rep: Reputation: 15
Ok at least fetchmail gave some reasonable info about "no new mail"
But how do i get my hotmails , read something about gotmail ?

is that really needed. can anyone tell me what's up with fetching my hotmail


firedancer
 
Old 10-30-2007, 08:05 PM   #8
firedancer
Member
 
Registered: Apr 2007
Posts: 146

Original Poster
Rep: Reputation: 15
ok, i'n following these steps, to save and autoload iptables, but when starting to create script, just echo "#!/bin/sh" returns an error

i'll post it later , it's short , if this doesn't go i'll just do get in the directory with nano and create it
 
Old 11-02-2007, 04:57 AM   #9
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
You can create a script with the iptable rules and try to start it from rc.local, meaning to add the script there and at every reboot it will set your iptables rules.

Another idea is ln -s /etc/rc.d/init.d/iptables /etc/rc3.d/S99iptables

This works on Redhat base distros like Fedora, CentOS, Mandriva and so on, I dont have idea what distro you are using...
 
Old 11-02-2007, 09:52 AM   #10
this213
Member
 
Registered: Dec 2001
Location: ./
Distribution: Fedora, CentOS, RHEL, Gentoo
Posts: 167

Rep: Reputation: 34
Quote:
Originally Posted by robertjinx
Another idea is ln -s /etc/rc.d/init.d/iptables /etc/rc3.d/S99iptables
You don't have to do this on Red Hat family systems, do this instead:
Code:
# chkconfig iptables --level 2345 on
firedancer, I'm not really sure what you're trying to do. What do you mean with: echo "#!/bin/sh"? I'd suggest a trip to http://iptables.org where you can find some actual firewall scripts. Also, you might check http://tldp.org/HOWTO/IP-Masquerade-HOWTO/index.html as that also includes a decent level of explanation of iptables scripts.
 
Old 11-02-2007, 01:28 PM   #11
firedancer
Member
 
Registered: Apr 2007
Posts: 146

Original Poster
Rep: Reputation: 15
Exclamation

sorry for not explaining what i meant, i was trying to follow some steps how t create the file and make it executable

i have a howto on iptables , i can append rules , but my problem was , making a file (iptables) and get it started automatically at boot,

i'm using debian etch ,is a headless server
i'll take a trip to...
so i set the rules and then i'm lost , show me a basic script to add the rules in the rc.local file, that's what i need help with , thank you
i'll hop to the sites later on to get some idea's on scripts , this is the part the i'm learning now , that's why i'm having trouble with it , thanx for the help though,

Last edited by firedancer; 11-02-2007 at 01:33 PM.
 
Old 11-02-2007, 01:45 PM   #12
this213
Member
 
Registered: Dec 2001
Location: ./
Distribution: Fedora, CentOS, RHEL, Gentoo
Posts: 167

Rep: Reputation: 34
in rc.local, you'd just enter the full path to the script. So, if your script is located at /etc/firewall/firewall.sh, you might have an rc.local like so:
Code:
#!/bin/sh

/etc/firewall/firewall.sh
 
Old 11-09-2007, 12:07 PM   #13
firedancer
Member
 
Registered: Apr 2007
Posts: 146

Original Poster
Rep: Reputation: 15
Smile

Ok, can just add the path to the firewall.file,
well my reading about iptables helped alot too, but i'll get this done , was still doing "iptables-restore > /etc/firewall.conf" , but now i know howto , thnx

Last edited by firedancer; 11-09-2007 at 12:10 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rc.local and scipts - command not found simonmorley Slackware 3 07-04-2007 03:31 AM
How do I FTP enable a website? imsam Linux - Newbie 3 11-29-2004 04:05 PM
PHP HOWTO : Run script as root guideweb Linux - Software 3 08-22-2004 11:38 PM
HowTo enable snmp andespoint Linux - Networking 0 05-02-2004 06:28 PM
users/passwords scipts Anthony Programming 1 03-27-2002 07:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration