AllowOverride All Cloud Engine template - wordpress

I am trying to run WordPress high availability on Google Cloud with the launcher and I get a problem with the AllowOverride All. I can set it manually on the content group instance but when another instance is created to handle the traffic, the new instance does not have the AllowOverride All on /etc/apache2/sites-enabled/wordpress.conf.
I tried adding it in the .htaccess on the root WordPress folder that will sync to all the instances but it does not work.
Is there any other alternative to add it to WordPress to get permalink working ?
Thanks

You can set a startup script in your instance template. Write a script that overrides the wordpress.con file with the content that you want and it will get executed on every instance's startup.
As you are running the WordPress High Availability solution from the GCP Marketplace, so the instance creation is managed by an instance group using a template. The whole update process would be something like the following:
Go to the instance groups menu in your GCP Console, under Compute Engine.
Identify the instance groups that belong to the WordPress high availability deployment and click in the template name
Copy the template. Now you can edit the startup script under management. There might be a script already, just add yours. Give the template a name and save it.
Now, to update the instance group to use the new template, edit the instance group and change the template it uses. After that you'll need to click the Rolling update button to actually update the instances.

Related

sulu cms set up multi port website

How can i set up multi portal website in sulu cms?
Example: I will have one admin panel from that i will manage content of site like
a.com, b.com, c.com...
I try by make copy of file
app/Resources/webspaces/example.com.xml
and make file lilke app/Resources/webspaces/one.com.xml
And in example.com.xml i also add another portal tag in portals but had no luck...
but in admin panel left side i see just one site example.com
How can i do that? Is there any documentation? Any link?
Thanks!
Multiple portals within the same webspace are not visible in the Administration UI, what you want are multiple webspaces. Just create a second XML file as described in our documentation, and make sure you have different URLs setup and both webspaces have a different value in their key tag. Afterwards you have to execute the bin/console sulu:document:init command once more to initialize some nodes.
Maybe also check the logs in var/logs for any errors and warnings, because if you have an error in your webspace configuration file, the new webspace will not show up in the admin UI.
Another thing that could go wrong is that you are missing the permissions to see the new webspace (that usually happens when you create a new webspace after you've executed the command mentioned above). In that case you have to navigate to Settings -> User roles -> Your userrole, and add the missing permissions in the shown matrix.

Rules requiring manual run in Alfresco

I have a rule on a folder which executes a JavaScript code whenever a new document enters the folder. The issue is the rule doesn't run automatically when a document enters the folder, but I have to run it manually.
I have tried running the script in background too. If I put a rule on update, that works automatically. The problem is with creation or entering of new documents in the folder. I am using Alfresco community 4.2.f share.
Please advise.
Thanks.
I cannot recreate this problem in Alfresco Community Edition 4.2.f. Make sure that:
All of the rules are enabled
The person putting the document in folder1 has permissions to create new documents in Folder 2.
The criteria for the rules are valid
The script in Folder 2 is not actually running. The best way to validate this is by turning on the server-side JavaScript debugger by editing $TOMCAT_HOME/webapps/alfresco/WEB-INF/classes/log4j.properties and setting log4j.logger.org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger=on
Alternatively, for #4, you could change to an out-of-the-box action, like another Move that would move the document to Folder 3. That's what my test does. If that works for you like it does for me, you would be able to narrow down your troubleshooting to a problem with the custom script.
when running scripts fired by rules you can't rely on search for the new doc since indexing isn't finished when the script runs. If SOLR is configured as search engine, indexing is executed async from outside the repository every 15 secs. You already may know that you can get the name from the script node?

Creating templates in Cloudstack

I am trying to get a cloudstack environment up and going. I have managed to get a server up, and it is pointed to my XenServer to manage. I have been able to create a couple of instances as well. In those instances, I have added some software, and gone through the initial install, and would like to make that my baseline. However, the screenshot below shows what I can see in the Templates section. When I click on Register template, I have no options for being able to make a template from a Volume or a snapshot of the instances I have created.
Am I doing something wrong here?
You want to Create Template
Create Template starts from an existing volume. In contrast, Register Template requires you to upload a volume into CloudStack.
If you want create template of a vm then you will have to stop the vm and then you will have find the root volume of that vm ,you can in two way .First click on instances ,then click that particular instance ,then click on view volumes ,then select the volume whose name is starting with ROOt ,select fourth icon which is for template creation.Then fill the form and submit. Second one is go dashboard ,select storage then find the root volume which is having you vm name in vm display name cloumn ,select that root volume ,the click on fourth icon which is to create template.Fill the form and submit it.

Drupal Commerce Kickstart - Making Test site of Live site

I want to do developments on my client's website but by making a clone of it. So, main website url is: http://website.com and the clone i am trying to create is: http://test.website.com.
So far i've done the following:
copied entire root directory into public_html/test dir (with folders config,field,FirePHPCore,fontyourface,includes,js,misc,modules,scripts,sites,styles and themes)
created a subdomain in cPanel for test.website.com
checked the file settings.php (inside sites/default folder) for $base_url but found it commented, so left it as it is unchanged.
copied db via phpMyAdmin and updated the new db details in settings.php (inside sites/default folder).
inside the table variable, two rows with the name securepages_basepath and securepages_basepath_ssl. Changed their values from http://website.com to http://test.website.com (using the variable_get and variable_set functions).
Now i can access http://test.website.com but when i click on login (from header) it takes me to http://website.com/user and if manually type http://test.website.com/user and login then it takes me to http://website.com/users/admin then i have to manually type in correct address http://test.website.com/users/admin.
And when i logout, it again takes me back to http://website.com.
So i want to know how can i completely make it to work on http://test.website.com?
Are there more variables to change?
And how i can make 100% sure that the test site is only using test and not the live site. I am afraid of messing up live website.
Please advice, thanks!
I fixed it by disabling the secure pages from inside the mysql database. It was inside variable table and securepages_enable field. It was in blob so i had to download the blob first and opened it in notepad and changed the value inside it from 1 to 0 and then uploaded it back by updating the securepages_enable field.
I had to do this because after logging in from my test url, the urls were redirecting back to the live website, so whatever change i was making, it was all affecting the live site.
Hope this helps to someone with similar case. Thanks!

Creating a duplicate WordPress install for testing

I am trying to create an identical wordpress website - on the same server. I need to create this as a testing environment but every time I try to duplicate the site it breaks. Is there an easy way to create a testing environment, of the live site, on the same server while keeping all of the same widgets, plugins and content?
I am an experienced web developer but a novice when it comes to Word Press.
I appreciate the help.
In my experience the following usually works:
Setup your prod site
Copy all files to the test site
Modify the wp-config settings as needed, and create the test db schema
Export all the data from the prod site control panel and import into the test site
The problem is that while you have all the files identically, your database contains all the configuration information for the live site. You'll need to copy the database from live to your development/testing server. You can run an export on the SQL and import the data into a new database. Then modify the wordpress/wp-config.php file in your development site to connect to the new copied database.
Additionally, you'll want to go through the new copied database, table: wp_options and change the site URL to match the development site/server instead of the live server.
Some default fields you'll want to change are:
option_name: home
option_name: siteurl
As well as fields installed by plugins that contain your site URL and path.
Create a directory for the testing.
Backup the original database, and
create another one (you may use the
same db user/pass if you like).
Execute the SQL file from the backup (at the test database)
Edit the wp-config.php.
(Test Database) Update the URL at the (your prefix)_options table. It's the very first value with the option name: siteurl
Done.

Resources