The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
new NIC card doesn't show in show-nets iperez SUN Solaris 13 09-26-2008 04:52 AM
Secondary groups show in groups but don't show in id (Not working) zen03 HP-UX 4 12-31-2007 11:15 AM
how to access root priveliges if root password is lost wojtyla Linux 1 02-18-2005 06:24 AM
Run non-root script as root with non-root environment bubba112557 UNIX for Dummies Questions & Answers 2 12-03-2004 12:39 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-16-2008
kumakuma kumakuma is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 10
Have htdocs/site/ show up at root

I have a site, www.mySite.com

I have a folder where pages are served from, htdocs/

I have a folder containing one site at htdocs/drupal/. I'd like to be able to go to www.mySite.com and see the index.php page within the drupal folder, but instead I see a directory listing:
drupal
phpBB3

How can I make this index page show up at www.mySite.com, and how can I hide the directory?

I think this is easily accomplished in Apache's config file, httpd.conf, but I can't figure it out.

Thank you so much! This is driving me crazy.
  #2 (permalink)  
Old 08-18-2008
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
Quote:
Originally Posted by kumakuma View Post
How can I make this index page show up at www.mySite.com
There are many ways to do it. Reading this would help you.
  #3 (permalink)  
Old 08-19-2008
kumakuma kumakuma is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 10
Still confused

Thank you very much for the link. After reading through it, I don't think that's exactly what I need. I want someone to go to www.example.com and see the page that really lives at www.example.com/drupal. I can see how I could redirect them from www.example.com to www.example.com/drupal, but I don't want the name in the address bar in the browser to ever change...

I was looking at RewriteBase inthe .htaccess file in my drupal directory, but wasn't sure if that was the correct way to go.

Sorry, but I'm still confused...

Thanks in advance!

Last edited by kumakuma; 08-19-2008 at 05:00 PM.. Reason: didn't want URLs parsed
  #4 (permalink)  
Old 08-19-2008
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,206
It's a really unattractive way to work, but if you don't want the address to ever change, then something like this could be what you want.

index.html:
Code:
<HTML>
<HEAD>
<TITLE>mysite</TITLE>
</HEAD>
<FRAMESET ROWS="*,0">
<FRAME SRC="http://www.mysite.com/drupal" NORESIZE>
<NOFRAMES>
Your browser does not support frames.
</NOFRAMES>
</FRAMESET>
</HTML>
  #5 (permalink)  
Old 08-19-2008
kumakuma kumakuma is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 10
Interesting

Wow, that's a very clever way to get it working! I tried it and it does indeed work. Thank you!

Sorry, I didn't mean I don't want the address bar to never change; I meant I didn't want to redirect visitors from www.mysite.com to www.mysite.com/drupal (which seems fairly easy to do with .htaccess, but then they would see the address bar change).

Ideally, I'd like visitors to be able to go to www.mysite.com and see what is in my public_html/drupal folder. The way I have it now, they would see a directory listing containing a drupal folder and a phpBB3 folder.

Of course, I could accomplish this by moving all the stuff from my drupal folder to public_html folder, but I'd like to keep things organized and keep the drupal site contained within the drupal folder.

I know there's some simple way to do this... I tried creating a symlink of the index.php file in the drupal folder in the public_html folder, but it didn't work.

Seems like I would need the drupal folder to be the RewriteBase for all the links from within the drupal folder to work correctly... (I'm not sure if this is the right variable, but after reading about it in the httpd.conf file, it seems like I'll need to incorporate it.
  #6 (permalink)  
Old 08-19-2008
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline Forum Advisor  
Disorganised User
  
 

Join Date: Nov 2007
Location: New Zealand
Posts: 922
Isn't it just a virtual domain you need here? If you want anybody visiting www.mysite.com to end up in ~/public_html/drupal/ and want anybody visiting via another alias (like www.mysitephpbb.com) to end up in ~/public_html/phpBB3/ then that would be the simplest solution I'd say...

If that is what you are after, add the following to your config:
Code:
<VirtualHost *>
    ServerAdmin webmaster@mysite.com
    DocumentRoot /path/to/htdocs/drupal
    ServerName www.mysite.com
</VirtualHost>
That should get you close. There's loads of docs out there for virtual hosting under apache
Closed Thread

Bookmarks

Tags
apache, drupal, httpd.conf, virtual server

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:16 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0