HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Technical (http://www.howtoforge.com/forums/forumdisplay.php?f=8)
-   -   Non-Ispconfig question apache (http://www.howtoforge.com/forums/showthread.php?t=291)

linutzy 16th August 2005 22:18

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

falko 16th August 2005 23:51

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

linutzy 17th August 2005 19:45

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

falko 17th August 2005 22:12

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.

linutzy 18th August 2005 11:09

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?

falko 18th August 2005 11:47

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! :eek:
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.

domino 18th August 2005 12:09

Sorry if I highjack this thread :p. 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.

falko 18th August 2005 12:40

Quote:

Originally Posted by domino
Sorry if I highjack this thread :p. 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

domino 18th August 2005 12:55

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



All times are GMT +2. The time now is 06:48.

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