Author Topic: chatroom/CGI/HTML Q's  (Read 1010 times)

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
chatroom/CGI/HTML Q's
« on: 30 June 2002, 23:42 »
I'm using Linux to run my server so this is in the linux forum.

I just got BlueChat, which enables chat logging.
It uses CGI. I am almost clueless about CGI stuff... Can i just make a directory called 'CGI-BIN' and use it for the CGI scripts??
Do i even need a cgi-bin for the .cgi scripts with apache?

[ June 30, 2002: Message edited by: Master of Reality / Bob ]

Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
chatroom/CGI/HTML Q's
« Reply #1 on: 1 July 2002, 00:19 »
How do i get apache to not list the directory contents?
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

KernelPanic

  • VIP
  • Member
  • ***
  • Posts: 1,878
  • Kudos: 222
chatroom/CGI/HTML Q's
« Reply #2 on: 1 July 2002, 00:51 »
You don't needa CGI-bin but is is common practice as it is safer.
Contains scenes of mild peril.

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
chatroom/CGI/HTML Q's
« Reply #3 on: 1 July 2002, 06:52 »
What permissions should i set on my CGI files (and the cgi-bin)??
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

choasforages

  • VIP
  • Member
  • ***
  • Posts: 1,729
  • Kudos: 7
    • http://it died
chatroom/CGI/HTML Q's
« Reply #4 on: 1 July 2002, 08:09 »
im gessing probably +rx
x86: a hack on a hack of a hackway
alpha, hewlett packed it A-way
ppc: the fruity way
mips: the graphical way
sparc: the sunny way
4:20.....forget the DMCA for a while!!!

KernelPanic

  • VIP
  • Member
  • ***
  • Posts: 1,878
  • Kudos: 222
chatroom/CGI/HTML Q's
« Reply #5 on: 1 July 2002, 21:39 »
I have a good link for you (MOR) about writing CGI and safety implications but you will have to wait till tomorrow because i have forgotten it...
Contains scenes of mild peril.

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
chatroom/CGI/HTML Q's
« Reply #6 on: 2 July 2002, 03:25 »
Well... once i get the CGI figured out, the chatroom will be up and running.
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
chatroom/CGI/HTML Q's
« Reply #7 on: 2 July 2002, 21:47 »
is there a way to copy stuff (like an image) through ssh to another computer?
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
chatroom/CGI/HTML Q's
« Reply #8 on: 2 July 2002, 21:50 »
Yes, but it's called "scp".  Do a "man scp".
Someone please remove this account. Thanks...

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
chatroom/CGI/HTML Q's
« Reply #9 on: 2 July 2002, 21:54 »
Ok, before you ask, here's an example:

scp myimage.jpg [email protected]dress:/directory/on/remote/machine

[ July 02, 2002: Message edited by: VoidMain ]

Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
chatroom/CGI/HTML Q's
« Reply #10 on: 3 July 2002, 21:47 »
whenever i tried to set-up the CGI for tha chatroom, when i clicked on it from teh browser, it would show the actual cgi file and not run it.
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
chatroom/CGI/HTML Q's
« Reply #11 on: 3 July 2002, 15:41 »
There is a line you have to uncomment  in the httpd.conf called:

AddHandler cgi-script .cgi

And make sure your Perl scripts end in *.cgi.
Someone please remove this account. Thanks...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
chatroom/CGI/HTML Q's
« Reply #12 on: 4 July 2002, 00:02 »
dont i also have to change the ScriptAlias stuff to change the location of my cgi-bin.
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
chatroom/CGI/HTML Q's
« Reply #13 on: 4 July 2002, 00:11 »
I made the directory '/var/www/html/cgi-bin' it has the same permissions as /var/www/cgi-bin but my browser says it cant fins the directory or file when trying to access bluechat.cgi which is in the cgi-bin.
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
chatroom/CGI/HTML Q's
« Reply #14 on: 4 July 2002, 00:28 »
I'm not sure why you have a /var/www/html/cgi-bin when you have a /var/www/cgi-bin.  What I normally do is make it so I can run CGI programs from anywhere under my web root.  You can do this in the section in the httpd.conf where the /var/www/html directory is defined.  There should be an "Options" tag.  I usually set it to:

Options All MultiViews ExecCGI

I also set:

AllowOverride All

which will allow you to use ".htaccess" files etc.  You should then be able to put CGI files anywhere under your web root and they will be executed.
Someone please remove this account. Thanks...