LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Howto enable php scipts to run only for certain website on homeserver (https://www.linuxquestions.org/questions/linux-server-73/howto-enable-php-scipts-to-run-only-for-certain-website-on-homeserver-594778/)

firedancer 10-26-2007 09:03 AM

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

firedancer 10-28-2007 12:36 PM

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

firedancer 10-29-2007 03:02 PM

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 ,


:)

firedancer 10-30-2007 09:11 AM

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 :)

this213 10-30-2007 10:23 AM

the command "iptables-save" will save all of your current rules. Even so, I'll usually just call the script from /etc/rc.local

firedancer 10-30-2007 04:56 PM

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

firedancer 10-30-2007 07:57 PM

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

firedancer 10-30-2007 08:05 PM

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

robertjinx 11-02-2007 04:57 AM

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...

this213 11-02-2007 09:52 AM

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.

firedancer 11-02-2007 01:28 PM

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,

this213 11-02-2007 01:45 PM

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


firedancer 11-09-2007 12:07 PM

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


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