LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-01-2011, 11:05 PM   #1
polaric
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Rep: Reputation: Disabled
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
 
Old 09-02-2011, 01:18 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
Try running the script on the command line and see what output you get
 
Old 09-02-2011, 01:33 AM   #3
polaric
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
what do you mean by that sir?. .sorry for being clueless. i'm just a newbie
 
Old 09-02-2011, 02:55 AM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,917

Rep: Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429
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 ?
 
Old 09-02-2011, 03:29 AM   #5
polaric
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
nope. it's not set in my httpd.conf. by the way wat is mode_perl for?. .thanks for the replies. .
 
Old 09-02-2011, 02:49 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,917

Rep: Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429
Quote:
by the way wat is mode_perl for?. .thanks for the replies. .
your perl script
 
Old 09-02-2011, 08:43 PM   #7
polaric
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
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.
 
Old 09-02-2011, 08:58 PM   #8
polaric
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
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!
 
Old 09-02-2011, 09:01 PM   #9
polaric
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
and also the redirect command
 
Old 09-04-2011, 08:13 PM   #10
polaric
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
please help me
 
Old 09-04-2011, 08:23 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,245

Rep: Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327
Have a good read or Chap 21 here http://www.linuxtopia.org/online_boo...ion/index.html
 
Old 09-04-2011, 11:22 PM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,917

Rep: Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429
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 .
 
Old 09-05-2011, 01:55 AM   #13
polaric
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
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.
 
Old 09-05-2011, 02:03 AM   #14
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,917

Rep: Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429Reputation: 2429
Quote:
web page is been set as documentroot in the .htaccess.
set it in the httpd.conf
 
Old 09-05-2011, 04:20 AM   #15
polaric
LQ Newbie
 
Registered: Sep 2011
Posts: 14

Original Poster
Rep: Reputation: Disabled
i've done wat u said. .but still it is not read.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Site error: the file /var/www/hotel/index.php requires the ionCube PHP Loader ioncube muba Linux - Software 1 06-03-2010 11:38 AM
/var/www domain name help illNino Linux - Newbie 6 11-05-2009 12:58 AM
Apache site redirects using what rule? foo.site.com -> www.site.com/foo LaughingBoy Linux - Server 2 04-16-2009 10:51 PM
Who should own /var/www and it's contents? morrolan Linux - Server 4 04-03-2007 03:55 PM
help in /var/www/html/!! chidomen Linux - Newbie 4 01-13-2005 12:02 PM


All times are GMT -5. The time now is 02:54 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration