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.

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.

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

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.

But Joe,

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

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.

It will be very nice if you could help me…

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

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

Thank you very much for your time/help!

r.

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-and-ubuntu-repos.html

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.

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 ]

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!

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!

PS: And the 500 error still there…

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?

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_problems/#the_wrong_site_shows_up

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

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?

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_problems/#internal_server_error