HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Have to manually add virtual server without WWW? (http://www.howtoforge.com/forums/showthread.php?t=5696)

lipp9000 21st July 2006 15:42

Have to manually add virtual server without WWW?
 
I have added a site in ISPconfig and I have the hostname left blank, and the domain to mydomain.com because if i add a hostname it just adds that before my domain with a dot, like this hostname.mydomain.com, and i dont want that because thats not the right domain i want.

Anyway, after saving the settings, i come back and notice that "www" has been put in the hostname field, even if i delete it again and come back, its there again. This is causing a problem because mail only gets sent to user@www.mydomain.com, it doesnt get sent to user@mydomain.com, which is what i want, it has to have the "www" before it which is stupid.

Also in order to have it so that people can go to mydomain.com without the "www", I have to add another virtual server in apache without the "www" in order for that to happen. And because in ISP config i have enabled phpscripts on the mydomain.com site, i cannot access php files through www.mydomain.com. For example i uploaded phpBB to mydomain.com/phpBB2, and it works if i go 2 that url, but if i go 2 the same URL www.mydomain.com/phpBB2 all i get is a text file of the php script indicating that php isnt enabled on that domain!

Is there a special way to add a site where both mydomain.com and www.mydomain.com works without having to add another virtual server??? Because its not letting me add another site in ispconfig without the www anyway, and plus i dont want 2 seperate file locations for the www domain, and the normal one.

Help would be GREATLY appriciated, thanks in advance!

fobicodam 21st July 2006 16:10

When you create a site (with the www as default) ISPConfig create the www.domain.com host and the domain.com alone.

Email must works.. even when everywhere you will see user@www.domain.com, its a "bug" "missconfig" (i dont know, look for previous posts).

If you dont want a www site (for example, im using some sites just for email, www are hosted over windows servers) put something like "mail", it works, then, create a codomain www.domain.com with your www server ip to create a dns record. Its look like the hostname field must be filled.

fobicodam 21st July 2006 16:13

About PHPBB (or any CMS), try this:

- Login to the ssh
- Go to your web folder (/home/www/webXX/web i guess)
- write:
chmod -R 777 phpBB (or your phpbb folder)
chown -R apache:apache phpBB (or your phpbb folder)

Run phpBB

If it works, its hard to explain, but you have to do it that way or configure SELinux...

lipp9000 21st July 2006 16:20

Thanks, ive just realized that the www in the hostname acts as a sub domain for mydomain.com, so that www.mydomain.com will work!

Anyway, Ive left the www in the hostname and tried to create a co-domain as you said, and i get this error

"Table './ispconfigdb/isp_isp_domain' is marked as crashed and should be repaired"

I was messing around with ispconfig in mysql before because i wanted to delete customers but there is no place to delete customers in ispconfig, i may have deleted something i shouldnt have. Can i repair this??

lipp9000 21st July 2006 16:29

no sorry, that didnt work. i tried chmodding and chowning what you told me to do, and yeh looks like php still isnt supported for the domain without the www.

but i think if i can get wot you told me to do before working, by adding mydomain.com as a co-domain, i think that would work.

But even in co-domain, it still asks for a hostname, what am i suppose to put in there? I cant put www again, or else it would be like www.www.mydomain.com right??

fobicodam 21st July 2006 16:32

Quote:

Originally Posted by lipp9000
Thanks, ive just realized that the www in the hostname acts as a sub domain for mydomain.com, so that www.mydomain.com will work!

Anyway, Ive left the www in the hostname and tried to create a co-domain as you said, and i get this error

"Table './ispconfigdb/isp_isp_domain' is marked as crashed and should be repaired"

I was messing around with ispconfig in mysql before because i wanted to delete customers but there is no place to delete customers in ispconfig, i may have deleted something i shouldnt have. Can i repair this??

You must never touch the ISPC database. You can delete everything from the control panel. Read the manual.

fobicodam 21st July 2006 16:35

Quote:

Originally Posted by lipp9000
no sorry, that didnt work. i tried chmodding and chowning what you told me to do, and yeh looks like php still isnt supported for the domain without the www.

but i think if i can get wot you told me to do before working, by adding mydomain.com as a co-domain, i think that would work.

But even in co-domain, it still asks for a hostname, what am i suppose to put in there? I cant put www again, or else it would be like www.www.mydomain.com right??

Codomains are for the main domain only. about php, you must miss something when you installed your linux, php must be working.

The empy hostname "domain.com" is created by default, but you can create another "domain2.com" as a codomain, just let the hostname empty, or "www.domain2.com", just put www as a hostname and domain2.com as a domain name.

lipp9000 21st July 2006 16:38

Quote:

Originally Posted by fobicodam
You must never touch the ISPC database. You can delete everything from the control panel. Read the manual.


Don't worry I did a database repair. Its working now;)

fobicodam 21st July 2006 16:54

The ispconfig database is relational. There are lot of tables just to join some records with others, if you delete something wrong you may cause ispconfig works badly or didnt work at all.. be carefull.


All times are GMT +2. The time now is 20:34.

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