Giter Site home page Giter Site logo

aegir vhost not loading? about boa HOT 34 CLOSED

mysty avatar mysty commented on July 17, 2024
aegir vhost not loading?

from boa.

Comments (34)

mysty avatar mysty commented on July 17, 2024

one thing I did notice was that drush (while in /var/aegir/drush ) wasn't in the path when I installed before your update to your script yesterday, but is in the path and runs just fine as of the alpha9e update

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

If anything doesn't work, while the installation was completed successfully, it probably means your DNS settings was not discovered correctly (or they are still wrong). But in any case, never touch manually Nginx configuration files and directories in /var/aegir. If it is set to listen on 127.0.1.1, then it means you have set your FQDN hostname and/or your custom web address for the Aegir frontend to something resolving to 127.0.1.1. Please double check what you have in /etc/hosts and what is the result of hostname -f command when run manually. This script was tested on servers with public IPs only, so its support for localhost installations is not confirmed/tested yet. Please post some details on your setup - local VM, how it's networked etc.

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

Drush is now by default symlinked as /usr/bin/drush, so it is in path but it has no impact on the installation and Aegir itself. It is just for easier access from command line, even when you are not logged in as an aegir user.

from boa.

agoddard avatar agoddard commented on July 17, 2024

I just did a new install using the latest script and have the same issue, nginx is listening on all interfaces, hostname -f returns the same name as I am trying to access in the browser but I'm still just getting the vanilla welcome to nginx screen

from boa.

mysty avatar mysty commented on July 17, 2024

Uh, yeah - how absolutely embaressing :P I did have a line saying

127.0.1.1  tstsrv.example.com tstsrv

in my /etc/hosts ... doh!!!!

What I always used to do was put something both the following in /etc/hosts

127.0.0.1   tstsrv.example.com tstsrv
12.34.56.78 tstsrv.example.com tstsrv #*

Except that this time the typo certainly didnt help.

So I got rid of that erroneous 127.* line so that /etc/hosts now looks like:

127.0.0.1   localhost
12.34.56.78 tstsrv.example.com tstsrv #*

.. ran the script again on a fresh install and ALL is just peachy with superfast
aegir - with memcache!

Thanks again

  • replace the example 12.34.56.78 IP and FQDN with your real ones

from boa.

agoddard avatar agoddard commented on July 17, 2024

awesome :) does hostname -f now return "tstsrv.example.com" or "localhost"?

from boa.

mysty avatar mysty commented on July 17, 2024

@agoddard I think that may be a feature of Aegir. Did you try going to http://your.domain.com/user ? I am getting the default "Welcome to nginx!" when I go to / as well.

TBH this is the first time I'm using Aegir on my own server so I'm not really sure, but I think it's the way it's supposed to be.

from boa.

mysty avatar mysty commented on July 17, 2024

@agoddard yeah! :)

hostname -f always returned tstsrv.example.com but my errant line was I think throwing things off.

from boa.

agoddard avatar agoddard commented on July 17, 2024

weird.. my hostname returns the correct name, but I still get a 404 on the /user and /user/reset urls..

from boa.

agoddard avatar agoddard commented on July 17, 2024

ah, it's cool now.. I just had to remove the default nginx vhost, I thought the script was doing that automagically..

from boa.

mysty avatar mysty commented on July 17, 2024

Pleased to hear it, I will try that myself. Was worried I closed the issue a bit early...
My bad

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

It should work with default host configuration as-is, unless you have set "localhost" as your domain, which is not supported (you need any real or false FQDN but never "localhost") and yes, if you will see the default Nginx "Welcome to Nginx" page, it simply means there is no correct entry for the domain name (URL) you are trying to reach. I think I will replace this default "Welcome" page with something better, like a nice "Under construction" page or something.

Anyway, if you are experiencing issues, please post some details about your configuration on http://gist.github.com, so I can help better.

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

I think I will add the check for "localhost" so it will deny it as a hostname or Aegir domain, since it shouldn't be used, because in the vanilla Nginx install we are using, there is already defaul host for "localhost" configured and we are not removing it to keep it vanilla clean for compatibility with manual installs reasons.

from boa.

mysty avatar mysty commented on July 17, 2024

I got the "Welcome to nginx!" for my http://tstsrv.example.com until I removed default from
/etc/nginx/sites-enabled
.. and restarted nginx. After that point I get the main Aegir pages served. My /etc/hosts file looks like
127.0.0.1 localhost
12.34.56.78 tstsrv.example.com tstsrv
/etc/hostname contains tstsrv.example.com - which is what hostname -f also returns, and I'm using 10.04, without touching any of the automatically created config files, bar adding a bunch of packages.

Been playing with it for hours and everything else seems to be working fine (though I probably need to reinstall postfix). Hope that may help :)

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

Excellent! Thanks for sharing your results =) Interesting why you had to remove the default nginx host and why your Postfix doesn't work as expected?

from boa.

agoddard avatar agoddard commented on July 17, 2024

Hi there, I ran the script on a clean install of Debian Lenny. Hostname, uname -n and hostname -f all returned the correct fqdn, when I got the e-mail from the script, it gave me a link at this fqdn to the password reset, though clicking the link gave me a 404. I edited vim /etc/nginx/conf.d/aegir.conf and commented out lines 75-83, which were the nginx default server, bounced nginx and everything worked fine. Hitting the domain name's root URL also gave me the correct aegir page at this point.
Hope that helps :)

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

You shouldn't edit that file. It is required as a default catch-all server for all not configured yet (in Aegir) domains, already pointing to your server IP address. You could replace the /var/www/nginx-default/index.html with something more fancy, but it should work there as is. Can you please copy and paste the content of your /etc/nginx/nginx.conf and /etc/nginx/sites-available/default files, here or in http://gist.github.com?

from boa.

agoddard avatar agoddard commented on July 17, 2024

Yep, here they are. without removing that default domain, nginx wouldn't serve aegir
/etc/nginx/nginx.conf -> http://gist.github.com/512329
/etc/nginx/sites-available/default -> http://gist.github.com/512331

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

Thanks, both files looks exactly the same as in all my tests, and it works for me with the default server defined in /etc/nginx/conf.d/aegir.conf. I'm really curious why it didn't worked for you. Could you please do me a favor and tried to uncomment those lines you commented out in /etc/nginx/conf.d/aegir.conf, then restart nginx by killall nginx; service nginx start and check if you still see the Welcome page instead of expected Aegir frontend?

from boa.

agoddard avatar agoddard commented on July 17, 2024

yep, I see the Welcome Page. It's the same behavior as it was before I commented them out. Interestingly though, if I hit the server by IP address (with them commented out), I get the drupal installation page (redirects to install.php).

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

Thanks. Anyway, that is odd. So your IP used is public and FQDN hostname is used to access Aegir front-end? And just to make sure, you have file matching your FQDN hostname in /var/aegir/config/server_master/nginx/vhost.d/* and inside that files you have line saying server_name your.fqdn.host.name ?

from boa.

agoddard avatar agoddard commented on July 17, 2024

yep, public IP, fqdn accesses the front-end. I have the file matching the fqdn in the vhost.d directory and there is the correct server_name line.

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

Thanks. That is very odd :) Is it some known provider so I could get a test account there and perform some debugging? I'm just doing it for Linode based servers.

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

Ah, btw, have you any custom stuff edited in your /etc/hosts maybe? mysty had to remove default file in /etc/nginx/sites-enabled to get it working and it also sounds odd (I don't see any reason why it could help :)

from boa.

agoddard avatar agoddard commented on July 17, 2024

unfortunately it's not a known provider. I took the default Debian Etch template from XenServer and dist-upgrade'd it up to Lenny, if that helps.

The contents of my hosts file are exactly as follows:

127.0.0.1 localhost localhost.localdomain
public.ip name.server.org name #*
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

Not sure if that kind of install (upgrade from Etch) can make any difference. Anyway, you don't need that line in your /etc/hosts: public.ip name.server.org name when you have correct IP set in your A record for this domain, but your /etc/hostname should contain your name.server.org FQDN hostname. Anyway, I can't reproduce it on any other Lenny server (I tried four in four different datacenters), so I would suggest to uncomment those lines in /etc/nginx/conf.d/aegir.conf and to remove the default file from /etc/nginx/sites-enabled instead, then please restart nginx. I will investigate it further.

from boa.

mysty avatar mysty commented on July 17, 2024

omega8cc, btw, postfix is working just fine. Gmail was just being a little aggressive on the filtering.

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

@mysty - thanks for confirmation. I'm still curious why you had to remove the default from /etc/nginx/sites-enabled to get it working. I can delete that file on install since it is never used, but I'm trying to leave the vanilla nginx config files as-is, to keep it compatible with standalone installs (without installer) with apt-get install nginx only.

from boa.

mysty avatar mysty commented on July 17, 2024

Is there anything I can do to help test? btw, I was running in a VirtualBox minimal install 10.04 vm (not that it should really make a difference), with a local DNS server taking care of the DNS side. Advantage of that of course is that it's easy to snapshot/test/rollback/test etc so if there is something I can do, please do let me know. I will have a go with your alpha9f on a vanilla 10.04 minimal and report back. May take a few days.

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

@mysty , Every new edition needs some testing, and I'm doing it always on the servers with public IP and hostname, so if you can test it on the local VM, it is always appreciated =) Thank you!

from boa.

agoddard avatar agoddard commented on July 17, 2024

@omega8cc I uncommented the lines and removed the default site, however the problem came back. I'm going to put this down to something different in my environment as everything is working ok for me now, I assume most people won't be taking a xen etch template and updating it to lenny..

btw, awesome script - it saved a ton of time.. this problem was pretty easy to get around and it sounds like I'm the only who had it..

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

@agoddard Thanks for the info. I like problems - it is the only way to get things improved! =)

from boa.

mysty avatar mysty commented on July 17, 2024

@omega8cc turns out I was flooded on my return to work and now about to leave the country for two weeks, but I look forward to doing more testing/feedback if I can be of any assistance when I return. Have fun and sorry not to be meeting you in CPH, as I won't be making it.

from boa.

omega8cc avatar omega8cc commented on July 17, 2024

@mysty I can't go to CPH due to gov contract :( so maybe next time. Thank you for your help. All the best.

from boa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.