my domain address w/o www.

16 posts / 0 new
Last post
#1 Mon, 08/27/2007 - 02:59
rfs1970

my domain address w/o www.

Hi There,

I have virtualmin pro installed in my server (ubuntu 6.10), and I would like to know if someone could help me to set my domains to be redirected with/without www.

For example:

mydomain.com | www.mydomain.com | - > Go to the same folder /home/mydomain/public_html

(I dont know if its because my server hostname has the same name as my first domain name (like the example above: mydomain.com)... everytime that I don't use the www. at begin, the browser is redirected to the default apache folder instead of /home/mydomain).

Any help its very welcome!

Thank you,

r.

Mon, 08/27/2007 - 10:59
mike

first off, go into the servers section and look in the apache configuration file for the domain you are trying to access, the first 4 lines of the apache directives file for the domain should resemble this:

[code:1]SuexecUserGroup "#1001" "#1002"
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /home/domain/public_html
[/code:1]

If the ServerName contains more then "domain.com" such as "shared.domain.com" then simply remove the hostname, and save and restart apache, this could simply be a mistaken error while creating the domain on the server while accidently placing something prior to the domain.

Thu, 08/30/2007 - 15:12 (Reply to #2)
Renato

PS: And the 500 error still there...

Thu, 08/30/2007 - 13:19 (Reply to #3)
Renato

i Joe

The 500 error is fixed already,
the problem that I told you in my previous post is about
any of my customers that you joomla are able to
edit any file at the administrator side.
(file permission)

Once again,
Thank you for your help!

Mon, 08/27/2007 - 15:44
rfs1970

Hi Mike,

Thank you for your help.
Now its working correctly...

The only problem that I see now is,
is the 500 internal server error

Wed, 08/29/2007 - 03:47 (Reply to #5)
Joe
Joe's picture

The 500 error is probably caused by the wrong suexec binary.

You'll need to rebuild apache2 with suexec set to /home, rather than /var/www, or no scripts will run under suexec.

--

Check out the forum guidelines!

Thu, 08/30/2007 - 02:53
Renato

But Joe,

I am using Virtualmin Pro... Do I have to compile anyway?

Thu, 08/30/2007 - 03:15 (Reply to #7)
Joe
Joe's picture

No, but you'll need to make sure you have our Apache version.

Ubuntu 6.10 isn't really supported...so, a rebuild might be needed to make a version that'll replace the default one. I don't have any 6.10 build boxes here, but I can walk you through the rebuild process, if you're not sure how.

--

Check out the forum guidelines!

Thu, 08/30/2007 - 03:59
Renato

It will be very nice if you could help me...

As I said before, I have the virtualmin pro version
btw, its f**** nice !!! :)

So, if you believe we could try something else
before, its up to you!

Thank you very much for your time/help!

r.

Thu, 08/30/2007 - 09:35 (Reply to #9)
Joe
Joe's picture

You could try forcing it to install apache2 from our repository, and see what happens.

First up, make sure you've installed our keys (this is a new thing), as documented here:

http://www.virtualmin.com/forums/news/secure-apt-conversion-of-debian-an...

Then install apache2 from the virtualmin-dapper repository:

apt-get install -t virtualmin-dapper apache2

Let us know what it says about that. We might even need to first remove the default one:

apt-get remove apache2

And then try the install command above again.

If none of that results in a suexec2 that points to /home, then we'll have to rebuild.

--

Check out the forum guidelines!

Thu, 08/30/2007 - 12:31
Renato

Hi Joe,

I installed the keys as you said,
and I installed apache2 from your repository as well

But when I start the apache2 i get this error message:
* Starting apache 2.0 web server... [Thu Aug 30 06:29:56 2007] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[ ok ]

Thu, 08/30/2007 - 21:33 (Reply to #11)
Joe
Joe's picture

So this one is easy to fix. There's even a chapter about it in the troubleshooting guide here:

http://www.virtualmin.com/documentation/id,troubleshooting_common_proble...

There's also one about 500 internal server errors. But make sure you've actually got the right suexec now:

# /usr/lib/apache2/suexec2 -V

--

Check out the forum guidelines!

Thu, 08/30/2007 - 17:44
Renato

Hi Joe,

Its partially working again... the main problem was the php version set to the page.

I said partially, because in that page specifically I use joomla, and the user doesn't have any permission to edit a file.

I believe it still has something to do with the apache/php, right?

Thu, 08/30/2007 - 21:42
Renato

Hi Joe,

I run the command that you said, and I got this message:

:~# /usr/lib/apache2/suexec2 -V
-D AP_DOC_ROOT="/home"
-D AP_GID_MIN=100
-D AP_HTTPD_USER="www-data"
-D AP_LOG_EXEC="/var/log/apache2/suexec.log"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_UID_MIN=100
-D AP_USERDIR_SUFFIX="public_html"

Does it mean something to you?

Fri, 08/31/2007 - 01:22 (Reply to #14)
Joe
Joe's picture

Looks good! That first line is the one we were concerned with, and it's set to "/home" just like a good suexec2 should be.

So, now we just need to figure out what's causing your 500 errors--it isn't suexec.

Check the error_log, and follow up in the troubleshooting documentation here:

http://www.virtualmin.com/documentation/id,troubleshooting_common_proble...

--

Check out the forum guidelines!

Thu, 08/30/2007 - 13:16
Renato

Hi Joe

The 500 error is fixed already,
the problem that I told you in my previous post is about
any of my customers that you joomla are able to
edit any file at the administrator side.
(file permission)

Once again,
Thank you for your help!

Topic locked