Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Technical

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 16th August 2005, 21:18
linutzy linutzy is offline
Member
 
Join Date: Jul 2005
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default Non-Ispconfig question apache

Going through the apache docs I was finally able to have a user create a directory and have it show up on the world wide web.
www.exampledomain.com/~user2

I have a static IP from my provider, and have a domain name registered, and would like it so that the user can load that same page by typing.

user2.exampledomain.com.

Also where can I donate to this howto. I love open source even if sometimes it doesn't love me back lol
Reply With Quote
Sponsored Links
  #2  
Old 16th August 2005, 22:51
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Create a DNS A record for user2.exampledomain.com that points to the same IP address as www.exampledomain.com.
In the vhost (Apache) for www.exampledomain.com, add user2.exampledomain.com under ServerAlias.
Then add rewrite rules to the vhost (you must have mod_rewrite enabled!), something like this:

Code:
RewriteEngine on
RewriteCond %{HTTP_HOST}   ^user2\.exampledomain\.com [NC]
RewriteRule ^/(.*)         http://www.exampledomain.com/~user2/$1 [L,R]
and restart Apache.

You can more about this topic here: http://httpd.apache.org/docs/1.3/misc/rewriteguide.html
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 17th August 2005, 18:45
linutzy linutzy is offline
Member
 
Join Date: Jul 2005
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default DNS Record

When you say change my DNS A record you mean login to easydns.com which is my registrar and make a user2.example.com in easydns.com.



Well I finally have ispconfig up and running on a debian machine and can't wait to show it's features at oclug.on.ca.
I will have a number of people (friends and family) using this server (none for resale) I don't know enough yet.

I understand how DNS works from an end user point of view, but can you give me an example of why I would set up BIND on this machine as indicated on your perfect debian howto setup page.

using apache 2.0 btw
Reply With Quote
  #4  
Old 17th August 2005, 21:12
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by linutzy
When you say change my DNS A record you mean login to easydns.com which is my registrar and make a user2.example.com in easydns.com.
Yes.

Quote:
I understand how DNS works from an end user point of view, but can you give me an example of why I would set up BIND on this machine as indicated on your perfect debian howto setup page.
If you were a real ISP, you would register domains for your customers, and then you can choose to outsource the DNS services and pay for that, or run your own DNS servers. That's where you can use ISPConfig.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 18th August 2005, 10:09
linutzy linutzy is offline
Member
 
Join Date: Jul 2005
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default One last one on this thread then done

If I do make the changes in apache manually as you described, does that break any features in Ispconfig when I try to create future accounts?
Reply With Quote
  #6  
Old 18th August 2005, 10:47
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by linutzy
If I do make the changes in apache manually as you described, does that break any features in Ispconfig when I try to create future accounts?
If you use ISPConfig, then don't write the rewrite lines to your vhost configuration manually!
Use the Apache Directives field in the ISPConfig web interface for that web site, or put the lines into a separate .htaccess file which you upload to that web site.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 18th August 2005, 11:09
domino domino is offline
Senior Member
 
Join Date: Aug 2005
Posts: 364
Thanks: 0
Thanked 8 Times in 7 Posts
Default

Sorry if I highjack this thread . But speaking of mod_rewrite, I use gallery 2 on my site. When I enable mob_rewrite, the site breaks. I figured it has something to do with the .htaccess file. I'm sure the Great How-To for Ferdora 3 enabled mod_rewrite, but Gallery doesn't recognise it. This question might not be the place for the right answer, but I was just wondering if you have any insites.
Reply With Quote
  #8  
Old 18th August 2005, 11:40
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by domino
Sorry if I highjack this thread . But speaking of mod_rewrite, I use gallery 2 on my site. When I enable mob_rewrite, the site breaks. I figured it has something to do with the .htaccess file. I'm sure the Great How-To for Ferdora 3 enabled mod_rewrite, but Gallery doesn't recognise it. This question might not be the place for the right answer, but I was just wondering if you have any insites.
Must have to do with your .htaccess file. Can you post it here? Maybe this thread helps you: http://www.howtoforge.com/forums/showthread.php?t=38
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 18th August 2005, 11:55
domino domino is offline
Senior Member
 
Join Date: Aug 2005
Posts: 364
Thanks: 0
Thanked 8 Times in 7 Posts
 
Default

I get an ERROR 500 every time, I enable URL Rewrite. It's no biggy is we don't get to the bottom of it. I'll just contact the Gallery guys.

Code:
# BEGIN Url Rewrite section
# (Automatically generated.  Do not edit this section)
<IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine On

    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d [OR] 
    RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
    RewriteCond %{REQUEST_FILENAME} !main\.php
    RewriteRule .   -   [L]

    
    RewriteCond %{THE_REQUEST} \ /v/(\?.|\ .)
    RewriteCond %{REQUEST_FILENAME} !main\.php
    RewriteRule .   /main.php?g2_view=core.ShowItem   [QSA,L]

    RewriteCond %{THE_REQUEST} \ /d/([0-9]+)-([0-9]+)/([^\/]+)(\?.|\ .)
    RewriteCond %{REQUEST_FILENAME} !main\.php
    RewriteRule .   /main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2   [QSA,L]

    RewriteCond %{THE_REQUEST} \ /v/([^?]+)(\?.|\ .)
    RewriteCond %{REQUEST_FILENAME} !main\.php
    RewriteRule .   /main.php?g2_view=core.ShowItem&g2_path=%1   [QSA,L]

</IfModule>

# END Url Rewrite section
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HowTo start developing ISPConfig till Developers' Forum 15 16th October 2012 10:36
apache user/group won't create directory weedguy Installation/Configuration 6 19th September 2005 23:40
suse 92 and apache for ispconfig mrh Server Operation 2 15th August 2005 21:25
ISPConfig crash DrAgOOn General 4 11th August 2005 22:00
Apache log question arcejorge General 1 29th July 2005 09:43


All times are GMT +2. The time now is 04:21.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.