LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trouble configuring my site in /var/www/ (https://www.linuxquestions.org/questions/linux-newbie-8/trouble-configuring-my-site-in-var-www-900645/)

polaric 09-01-2011 10:05 PM

Trouble configuring my site in /var/www/
 
Hi i'm a newbie in linux web hosting. I have trouble configuring my newly design web. I have putted it in /var/www/html but still it doesn't work. we have an existing webpage that is controlled by cgi scripts here's our website www.dwcc.edu.ph. I just want my newly design interface for our school to be publish. .i'm not using cgi anymore for my new pages, i've tried everything but still it can't be read.

And also on the cgi script i tried to trick it by changing the code, goes something like this:
#!/usr/bin/perl
use CGI qw(:standard -no_xhtml :html3);

$q = new CGI;

print $q->header;

open(FH,"etc/dwcc.html");<---i change this with open(FH,"dwcc2/dwcc.html") just to trick it. but the output s***s.
while (<FH>) {
print $_;
if ($_ =~ /<!-- Dynamic Contents -->/) {
print "<table border=0 cellpadding=8 cellspacing=1><tr><td align=left valign=top width=\"655\">\n";
&get_contents;
print "</td></tr></table>\n";

}
}

PLease help me. All i want is my newly design page to be read. Thank you so much
Mark

kbp 09-02-2011 12:18 AM

Try running the script on the command line and see what output you get

polaric 09-02-2011 12:33 AM

what do you mean by that sir?. .sorry for being clueless. i'm just a newbie

John VV 09-02-2011 01:55 AM

i suggest you reread the Apache documentation
https://httpd.apache.org/docs/2.2/

and study them as you would for a final exam

Is mod_perl set in the httpd.conf ?

polaric 09-02-2011 02:29 AM

nope. it's not set in my httpd.conf. by the way wat is mode_perl for?. .thanks for the replies. .

John VV 09-02-2011 01:49 PM

Quote:

by the way wat is mode_perl for?. .thanks for the replies. .
your perl script

polaric 09-02-2011 07:43 PM

oh i see. it's not set in my httpd.conf. .sir it's just even i put my new webpage in /var/www/html it still can't read it. .my domain always load the existing page that is using the cgi script.

polaric 09-02-2011 07:58 PM

where can i put the mod_rewrite? .i think it can help to redirect the url of my domain. can you help me create a script?

my new webpage is located on /var/www/html on a folder dwcc2. please help me!

polaric 09-02-2011 08:01 PM

and also the redirect command

polaric 09-04-2011 07:13 PM

please help me

chrism01 09-04-2011 07:23 PM

Have a good read or Chap 21 here http://www.linuxtopia.org/online_boo...ion/index.html

John VV 09-04-2011 10:22 PM

without knowing EXACTLY ( as in reading the full code for the web site)
all we can do is guess and point you to the documentation .

assuming this is Apache server from this " /var/www/ " the default location
what is the orig. "Document root" set at
is it using php or perl or ruby
just how is this "cgi" redirect set up

for security reasons you can not inform us of these things
so YOU need to figure them out
or
higher someone to do that . there are plenty of consultants



you can leave the old site up using a vhost to a test address then when ready switch them .

polaric 09-05-2011 12:55 AM

my new web page is been set as documentroot in the .htaccess. .then i created a redirect command for my new web page. how is it that our old website is the one being read?. my mistake,the cgi only controls the browsing page of the old page. where can i disable the cgi, how can my domain read my new web page. it's been a headache for me for almost a week now.

John VV 09-05-2011 01:03 AM

Quote:

web page is been set as documentroot in the .htaccess.
set it in the httpd.conf

polaric 09-05-2011 03:20 AM

i've done wat u said. .but still it is not read.


All times are GMT -5. The time now is 03:37 PM.