Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't disable css or javascript optimization #47

Closed
tribeofdan opened this issue Sep 13, 2010 · 14 comments
Closed

Can't disable css or javascript optimization #47

tribeofdan opened this issue Sep 13, 2010 · 14 comments

Comments

@tribeofdan
Copy link

tribeofdan commented Sep 13, 2010

Background: I'm running Barracuda Aegir with Nginx Edition 0.4-alpha11-A11.A. I have jquery_ui installed as well as jquery update.

I'm using a normal drupal 6.19 platform and I'm running a site on it and can't disable css or javascript optimization to debug a possible JS conflict I'm having with a module a theme. (refer: http://drupal.org/node/905316)

I go to the performance page at: /admin/settings/performance

I click to disable css and js optimization and click 'Save Configuration'. I get the 'The configuration options have been saved.' message but it doesn't actually change anything. The page still shows 'Enabled.'

I tried changing the database directly with the following commands.
UPDATE variable SET variable.value = 's:1:"0";' WHERE variable.name = 'preprocess_js';
UPDATE variable SET variable.value = 's:1:"0";' WHERE variable.name = 'preprocess_css';

...but it still made no changes.

Could there be anything in this Barracuda Aegir set up that is overriding the performance settings?

@linuxgeneral
Copy link

linuxgeneral commented Sep 13, 2010

Cache is enforced in AEgir

I noted this at:
http://groups.drupal.org/node/84074#comment-285394

The Octopus installer has a option to override this with a sub-domain named devel as described in the intro email

@omega8cc
Copy link
Owner

omega8cc commented Sep 13, 2010

It is hardcoded in this include file (it is included at the end of every settings.php for every site) http://github.com/omega8cc/nginx-for-drupal/blob/master/aegir/conf/global.inc.aegir.txt#L12

This file is located in /data/conf/global.inc for every Octopus instance and in /var/aegir/config/includes/global.inc in the main Hostmaster instance.

It is explained here: http://github.com/omega8cc/nginx-for-drupal/blob/master/aegir/conf/setupmail.txt#L172

You can of course comment out those lines to avoid hardcoded caching.

@tribeofdan
Copy link
Author

tribeofdan commented Sep 13, 2010

Thanks so much for the prompt response and info. I didn't know Octopus existed... this looks great!! I have been using Barracuda for development.

I would like to upgrade from my set up to Octopus and copy my sites across. Is there a best way of doing this? Do I have to reinstall Lenny and run this script from scratch or can I upgrade?

Then as I understand I could add a sub-domain called 'devel' for the site I'm working on and test this thing.

Would you be so kind as to walk me through it? I've resisted upgrading Barracuda because I'm scared to lose this site. (Its not under version control.)

Thanks!

@omega8cc
Copy link
Owner

omega8cc commented Sep 13, 2010

Those sites can stay with core Hostmaster installed by Barracuda, since moving them requires a few steps and you can feel not comfortable with it if you never migrated sites before, so I don't recommend that (however I will write a how-to probably). You don't need to re-install anything. Both Barracuda and Octopus can be safely used to upgrade your OS, you core and non-core Hostmaster instances and to add newer versions of platforms on any Octopus instance. Just run the script(s) again - but please use latest versions always.

To rename the site (to get the "devel" in subdomain), simply use migrate task, change domain and choose existing platform. It will rename the site for you.

@tribeofdan
Copy link
Author

tribeofdan commented Sep 13, 2010

Great, thanks! So I ran the Barracuda script and it worked great. Running the Octopus script gave me three errors (see below). I first tried to run it with my existing aegir user 'daniel' but it would let me saying "ALERT! _USER is already used or too similar to existing, exit now...".
So I created a new user 'danlewis' and the script ran but with 3 errors. Should I be worried about these? I can't access hostmaster now. What do you recommend I do?

==> Tue Sep 14 09:15:01 EST 2010 INIT A: pre-install start
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'

==> Tue Sep 14 09:15:42 EST 2010 INIT A: post-install start
chgrp: cannot access /data/disk/danlewis/aegir/distro/001/sites/aegir.example.com/files': No such file or directory chgrp: cannot access/data/disk/danlewis/aegir/distro/001/sites/aegir.example.com/settings.php': No such file or directory
/opt/tmp/nginx-for-drupal/aegir/barracuda/AegirSetupA.sh.txt: line 314: cd: /data/disk/danlewis/aegir/distro/001: No such file or directory

==> Tue Sep 14 09:24:47 EST 2010 INIT C: Save & Verify Platforms
AegirSetupC.sh.txt: line 769: cd: /data/disk/danlewis/aegir/distro/001/sites/aegir.example.com: No such file or directory

Thanks :)

@tribeofdan
Copy link
Author

tribeofdan commented Sep 14, 2010

I didn't realise I was meant to use host.example.com for Octopus. I just ran the scripts both using aegir.example.com. Now my aegir instance isn't working nor all of my sites. Please help!

@omega8cc
Copy link
Owner

omega8cc commented Sep 14, 2010

Quick fix:

  1. Go to /data/disk/$_USER/config/server_master/nginx/vhost.d (replace $_USER with the name you have used for _USER in Octopus.
  2. Rename the file aegir.example.com to anything.example.com
  3. Run as root: $ killall nginx; service nginx start

Then install a new Octopus instance. We will add a security check to prevent such mistakes in the future.

@tribeofdan
Copy link
Author

tribeofdan commented Sep 15, 2010

Thanks for your response! However, I'm stuck on point one... in my 'server_master' directory I don't have the 'nginx' directory. Any ideas why this could be?

@tribeofdan
Copy link
Author

tribeofdan commented Sep 15, 2010

$ find / -name 'vhost.d' gives...
/var/aegir/config/server_master/nginx/vhost.d

This is the only vhost.d on my system. It has all my sites in it including a new one 'cgp.aegir.example.com'

$ nano aegir.example.com
Contains...
server {
limit_conn gulag 10; # like mod_evasive - this allows max 10 simultaneous $
listen 999.999.999.999:80;
server_name aegir.example.com;
root /var/aegir/host_master/002;
index index.php index.html;
include /var/aegir/config/includes/nginx_simple_include.conf;
}

Should this be edited to be "/var/aegir/host_master/001;"?

$ killall nginx; service nginx start
nginx: no process killed
Starting nginx: [emerg]: open() "/var/aegir/config/includes/fastcgi_params.conf" failed (2: No such file or directory) in /var/aegir/config/server_master/nginx/vhost.d/cgp.aegir.example.com:3
nginx.

Sites are all still down. Thanks for all your help with this!

@omega8cc
Copy link
Owner

omega8cc commented Sep 17, 2010

If your upgrade failed and you don't have anything working in /var/aegir/host_master/002 then yes, you need to change the path to your previous hostmaster directory. Then run the latest Barracuda A14.A upgrade again. It should work this time. For now remove that line with fastcgi_params.conf from /var/aegir/config/server_master/nginx/vhost.d/cgp.aegir.example.com file and start nginx.

@tribeofdan
Copy link
Author

tribeofdan commented Sep 21, 2010

I removed the line with fastcgi_params.conf. I had to do this for most sites.

I reinstalled Baracuda with the lastest script. It worked by now its at Hostmaster/003

nginx restarted like this...

aegir:/var/aegir/config/server_master/nginx/vhost.d# service nginx start
Starting Nginx Server...:[warn]: conflicting server name "_" on 999.999.999.999:443, ignored
.

Aegir is working again! :) However, why is fastcgi_params.conf missing?

Would it be better for me at this point to back up my sites locally and reinstall Lenny to run the scripts afresh? I get the impression this has become quite messy.

@omega8cc
Copy link
Owner

omega8cc commented Sep 21, 2010

Don't edit anything manually, just run the system and core hostmaster upgrade using Barracuda and run Octopus hostmaster upgrade if you are using it. Then re-verify all sites. It should help.

@tribeofdan
Copy link
Author

tribeofdan commented Oct 29, 2010

Hi, it's been a while since i've upgraded the script. I still have to manually edi out fastcgi_params.conf for evey new site provision. If I ru the script again am I safe? I still have this messed up Octopus install on here.

If there a way to back up my sites safely, reinstall lenny and start afresh?

Or is there a way to remove the old octopus etc?

@omega8cc
Copy link
Owner

omega8cc commented Nov 4, 2010

You should be able to upgrade Octopus to the working version and then you need to re-verify all your sites to re-create their vhosts files, I don't think you would need to go with system level re-install or Octopus re-install. It is possible to create a new Octopus instance and move sites there, but first try the simple recipe first and simply upgrade Octopus, then re-verify all sites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants