Koozali.org: home of the SME Server

[resolved]: Tweeking Virtual Domians

Offline PapaQube

  • *
  • 9
  • +0/-0
[resolved]: Tweeking Virtual Domians
« on: July 20, 2008, 11:47:59 PM »
Hi there community

I wonder if there is anyone out there who can help roll back some changes i have made in an attempt to set up some web apps for testing.

Aside I am not the greatest with commend line or Linux, but attempting to learn - I usually learn by breaking things several times over.

Anyway, I have lost access to my server manager, not sure how but know that it was down to either:

1) moving my primary www domain to a different ibay (i.e. mypersonalweb ibay); or

2) following the howto 'Web Application Redirection Tutorial' here http://wiki.contribs.org/Web_Application_Redirect_Tutorial;


Some history may prove useful:

I have been looking at some cms web apps. I first installed wordpress as in the contrib, but removed this and manually installed in an ibay called blog. Mainly because I am comfortable with ibays, and also because I wanted to use the domain name 'www.blog.mypersonalweb.co.uk', as I have 'mypersonalweb.co.uk set up as a virtual domain.

Realising that the web app would also be displayed with the url 'www.mypersonalweb.net/blog', I moved the www for my primary domain ('mypersonalweb.net') away from the primary ibay to another ibay named 'mypersonweb'.

While wordpress ran ok in an ibay i kept getting errors with many plugins I installed. I automatically assumed this was something to do with the config of sme, and hence why many sme contribs install in /opt. With this assumption I re-installed wordpress again in /opt using the contrib, and of course the plugins worked.

I then went on to install SMF using the contrib, for testing alongside wordpress. Again I had intended to use the url 'www.forum.mypersonweb.co.uk' for this app, and had previously set up the ibay 'forum' and virtual domain forum.mypersonalweb.co.uk. To avoid problems i experienced with putting the apps in an ibay, I followed the Web Application Redirection Tutorial, but instead of

- config setprop smf domain www.mypersonalweb.co.uk;

I used the address for the virtual domain I had previously set up:

- config setprop smf domain www.forum.mypersonalweb.co.uk;

Note, I had not used the forum ibay previously, and the ibay was still dormant as I had not set a password.

After completing the web app redirection tutorial, www.forum.mypersonalweb.co.uk did not point to my smf in /opt, however www.mypersonalweb.net/forum did.

It was at this point that I noticed that i had lost access to server-manager, normally accessed http://serverip/server-manager:

After which I removed smf via yum, dropped the DB and deleted appropriate files in /etc/e-smith/templates/etc/httpd/conf/httpd.conf, however this has not brought back server-manager. I just get a 404 message. I did note that www.mypersonalweb.net/server-manager still gives me a forbidden error as I have server-manager configuredto local server only.

I have tried forum for solution, but I am struggling as this is overwhelming and keeps taking me in the direction that caused my problems. I would like to roll back the changes to server-manager, clean my server before looking for a different solution.

Any help would be greatly appreciated, I realise that I have made a dumb newbie error. Running SME 7.3 in server-only mode.

Many Thanks.

« Last Edit: July 27, 2008, 04:31:14 PM by PapaQube »

Offline PapaQube

  • *
  • 9
  • +0/-0
Re: HELP: Tweeking Virtual Domians Now Lost Server-Manager
« Reply #1 on: July 21, 2008, 12:45:07 AM »
Issue resolved - the following line in the httpd log:

- /opt/wordpress/server-manager

Not sure why or how, config the web application redirection tutorial for SMF. Any way removed wordpress from /opt and all ok.


Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: HELP: Tweeking Virtual Domians Now Lost Server-Manager
« Reply #2 on: July 21, 2008, 09:49:09 AM »
Issue resolved - the following line in the httpd log:

- /opt/wordpress/server-manager

Not sure why or how, config the web application redirection tutorial for SMF. Any way removed wordpress from /opt and all ok.


It is most likely due to the redirects you are enforcing, but since you are not posting relevant data from the log that is hard to judge.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline PapaQube

  • *
  • 9
  • +0/-0
Re: HELP: Tweeking Virtual Domians Now Lost Server-Manager
« Reply #3 on: July 21, 2008, 10:44:07 AM »
Thx Catcus;

Let me know which data from which log and I will post for ref. The line if the httpd log was as follows:

[Sun Jul 20 21:22:59 2008] [error] [client x.x.x.x] File does not exist: /opt/wordpress/server-manager

Offline PapaQube

  • *
  • 9
  • +0/-0
[Solved]: Tweeking Virtual Domians
« Reply #4 on: July 26, 2008, 01:33:55 AM »
 :-?

I am still banging my head against the wall with this issue. I have just installed Joomla using the contrib and then following the web app redirection tutorial again, only changing the line:

Quote
config setprop joomla domain www.virtualdomain.com

to:

Quote
config setprop joomla domain www.work.virtualdomain.co.uk/cms

But I am still experiencing them same problems. I appreciate Catcus's comments regards the redirects I am forcing is the correct diagnostic but I am not sure where to look:

the /etc/httpd/conf/http.conf says:

Quote
# Redirect an existing hostname or domain to /opt/joomla.
<VirtualHost 0.0.0.0:80>
    ServerName  www.work.virtualdomain.co.uk/cms
    DocumentRoot /opt/joomla
</VirtualHost>
<VirtualHost 0.0.0.0:443>
    ServerName  www.work.virtualdomain.co.uk/cms
    DocumentRoot  /opt/joomla
    SSLEngine on
</VirtualHost>

This is my template fragment

Quote
{
  my $status = $joomla{'status'} || "disabled";
  return "    # joomla-status is disabled.\n"
          unless $status eq 'enabled';
 my $domain = $joomla{'domain'} || "disabled";
  return "    # no hostname or domain for joomla defined\n"
          if $domain eq 'disabled';
  my $DocRoot = "/opt/joomla";
 $OUT  = "";
  $OUT .= "\n";
  $OUT .= "# Redirect an existing hostname or domain to $DocRoot.\n";
  $OUT .= "<VirtualHost 0.0.0.0:80>\n";
  $OUT .= "    ServerName  $domain\n";
  $OUT .= "    DocumentRoot $DocRoot\n";
  $OUT .= "</VirtualHost>\n";
  $OUT .= "<VirtualHost 0.0.0.0:443>\n";
  $OUT .= "    ServerName  $domain\n";
  $OUT .= "    DocumentRoot  $DocRoot\n";
  $OUT .= "    SSLEngine on\n";
  $OUT .= "</VirtualHost>\n";
}



when i run 'config show joomla' i get:

Quote
    DbName=joomla
    DbPassword=/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    DbUser=joomlauser
    Name=Joomla
    PublicAccess=global
    domain=www.work.virtualdomain.co.uk/cms
    status=enabled
    www.work.virtualdomain.co.uk=cms

However when I browse to x, i get z

www.work.virtualdomain.co.uk = ibays/work/html
www.work.virtualdomain.co.uk/cms = 404 Not Found
www.work.virtualdomain.co.uk/joomla = /opt/joomla

- www.domain.co.uk = ibays/Primary/html
- www.domain.co.uk/joomla/ = /opt/joomla
- www.serverlanip/server-manager = 404 Not Found

My /var/log/httpd/error_log reads:

www.work.virtualdomain.co.uk/cms
Quote
[Sat Jul 26 00:01:50 2008] [error] [client WAN-IP] File does not exist: /home/e-smith/files/ibays/work/html/cms
[Sat Jul 26 00:10:48 2008] [error] [client WAN-IP] File does not exist: /home/e-smith/files/ibays/work/html/cms

and for https://serverip/server-manager it is
Quote
[Sat Jul 26 00:18:26 2008] [error] [client LAN-IP] File does not exist: /opt/joomla/server-manager
[Sat Jul 26 00:18:29 2008] [error] [client Lan-IP] File does not exist: /opt/joomla/server-manager

Losing the will to live on this now - any help as to where to look next is greatly appreciated.

Many Thanks
PQ


------------------

I have solved my problem by placing web apps in ibay, didn't resolve the above. Many Thanks for taking the time to look over, or help.
« Last Edit: July 27, 2008, 04:30:18 PM by PapaQube »