Building a service for a Drupal site to duplicate a node to another Drupal site in a multi-site setup - api

I'm trying to set up one of my Drupal sites to push a node to another Drupal site in a multi-site configuration. It looks like I need to do this with services somehow, but I can't find any tutorials out there and I need at least to be pointed in the right direction.
What I believe I need is set up Services on the receiving site to accept a call from the sending site which will be sending the node object via Json or serialized PHP using a Key that was set up on the receiving site. Can anyone show me an example of this working or give me some insight?
thanks

have you checked out the deploy module on d.o (drupal.org)? It's a great tool to push changes (also nodes) from one installation to another. It uses the services module for the communication.
I have not tested it with a multisite installation, but I guess it should work if at least the domain names are different for each site.
Regards
Mike

Related

PHPBB 3.0.1 website migrating to new hosting service

I am trying to find some guidance on where to go next on the issue I am having migrating a phpbb3 site from one hosting service to another.
I have checked to make sure the config.php file has been changed to work on the new server, as well as the common.php file. I am getting a HTTP 500 error when I try to search for the forum. The main site is working normally, just the message board is having a problem.
Nothing about the structure of the sites pages has changed, only the hosting server. (I downloaded a copy of the website before moving it so I have everything in the exact way it was before, just on the new server.)
Do I need to install phpbb onto the server itself with Softaculous?
Anything would help, I need to get the site back up and running soon.
Thanks in advance.
Jacob
This post would have been better addressed on phpBB.com support section...
In any cases most hosting companies out there will perform the migration for you for free.
Did you ask about handling a migration for you?
There are many things that need to be done when migrating to a new hosting.
here a couple of pointers for you:
-PHP version in use should be PHP 5.6.x as phpBB 3.0.x does not support higher PHP versions
-config.php might need updating, for example these two fields:
$dbhost = '';
$dbport = '';
-check your error logs in your cPanel as they will reveal the cause of the 500 error
Also, NO you do not need Softaculous
I'll be happy to help you with this if you PM me on:
https://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=1428301
-SiteSplat
The php version on the new hosting services server was above what phpBB 3.0.x needed. I upgraded phpBB to version 3.2.9 and the issue was resolved.

Can I direct a cpanel folder to a domain name hosted with a different registrar?

I'm wondering if this is possible and I'm not sure that it is. Before I explain, I found one other post [here]: Separate Domain Registrar and Host, possible to use CDN? which sounds similar to my problem, but I specifically don't want to point the Name Servers away. I only mention this because my question is going to sound very similar.
So I'm trying to help a friend who has a Domain Name registered on Site A (let's assume it's a place like Wix). He also has a hosting package on Site B (to have cpanel access for a site he had built with HTML & PHP).
for example:
1. www.yourdomain.com is hosted on Wix with a template website
2. "database" is a cpanel folder on Site B
Is there a way to have www.yourdomain.com/database link to the "database" folder on Site B's hosting -- without changing the Name Servers?
I don’t believe you can point a directory to a completely different server or hosting package.
However creating a sub domain instead could be your answer.
Is there anything stopping you from using database.yourdomain.com and creating an A record for this in your domain registrar and point it to the hosting package of database?

aspboilerplate multi-tenant configuration using {0}.domain.com format

I downloaded the latest aspboilerplate. In documentation
it lists 3 tenant resolvers.
document ask to add;
Configuration.Modules.AbpWebCommon().MultiTenancy.DomainFormat = "{0}.mydomain.com";
to get domain based tenant resolving.
I am using hosts file to simulate actual URLs. So, I feel the app config should be something like below (apart from above code change to Abp module);
"App": {
"ServerRootAddress": "http://server.mydomain.com",
"ClientRootAddress": "http://{0}.mydomain.com",
"CorsOrigins": "...."
},
But the documentation doesn't mention anything related to that. So, I don't think the documentation is complete.
Then in IIS, I have two sites.
API site : server.mydomain.com. Bindings set to server.mydomain.com
Client site : mydomain.com. A new binding will be added such as subdomain.mydomain.com for new tenant(s). So basically in IIS for client site there can be many bindings with different subdomains portion, but pointing to the same site.
Then I ran the api site xxxx.web.host.exe. I assume it should pick the correct urls to listen to from appsettings. But it doesn't. it shows;
Now listening on: http://localhost:5000
And I am not sure where its coming from since there is no reference to that in code.
How can I get this properly configured to run on IIS with subdomain based tenant resolver?
Actual issue(s) were outside of what I have thought. In brief;
https://edi.wang/post/2018/12/27/path-caveat-with-aspnet-core-22-iis-hosting is one issue which crashed the app at the very beginning. Reason is it was loading log4net config file at Startup() and because of the way asp.net core 2.2 works, in IIS inproc mode it can't find the file.
https://weblog.west-wind.com/posts/2019/Mar/16/ASPNET-Core-Hosting-on-IIS-with-ASPNET-Core-22 this helped a lot to understand and tackle the issue.
Make sure you don't mix 32bit 64bit when hosting in IIS.

Virtual Directory to navigate to http://localhost/MyWebsite instead of http://localhost:8080

I have deployed an ASP.NET MVC 4 application to a new site I have created in IIS 7.5, which I have bound to port 8080. I can reach it by navigating to http://localhost:8080, but I want to reach it via http://localhost/MyWebsite.
I have added a Virtual Directory under my website, which points to "C:\inetput\wwwroot\MyWebsite\". However, when I navigate to http://localhost/MyWebsite, I am presented with a configuration error:
"It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This
error can be caused by a virtual directory not being configured as an
application in IIS."
Here is what my IIS hierarchy looks like (this is a demo since I have no internet access on the server I am working on).
I have two questions:
Why am I getting this error?
Is this the best way to go about achieving what I want? It seems messy to have the list of files and folders underneath the website and then again underneath the Virtual Directory. If there is better practice then please tell!
Virtual Directories cannot execute scripts, reason why you are getting that error. You need to make your MyWebsite folder an Application. Also, you don't necessarily have to create a separate website for your website, you can use the Default Web Site and create an application MyWebsite in there (it might be less confusing maybe?).

Can a website be cached anywhere other than a browser's cache?

My client is seeing a different version of the website on his computers then what I am seeing on mine. He claims to be deleting the cache. I'm using Safari with the cache disabled via the Develop menu and I see the correct version of the site.
Is it possible that the website is somehow cached by my client's ISP or something along those lines?
Update:
I think I need to describe the problem better:
My client has a web hosting package where he has his domains and email accounts. somedomain.com has it's A record changed to point to Behance's ProSite hosted service.
The problem is that when he goes to somedomain.com he gets the index.html that's sitting in his web server's public_html directory, and not his ProSite. Using the same domain I see the ProSite. He has cleared his cache and tried on a computer at home with the same result. This is what lead me to believe that there is some sort of caching issue somewhere along the line with his ISP(s).
Is there anything I can do about this?
Proxy servers at the ISP or even the client's site might do this. Or even network-compressors in some (mal)configurations.
Depending on the site you might also be seeing actually a different site. e.g. Google redirects to different servers using DNS load balancing.
Yes, you're right. To improve performance and the speed in loading page from the same request modern browser seem to great at caching. I myself have the same problem as well. To resolve this problem You should tag version of your projects whenever you deploy them to production.
Based on the update, the problem was with DNS cache.
DNS can be cached at the following levels:
browser
operation system
router
DNS provider
And each of them has its own way to flush DNS cache. Except DNS provider where the only thing you can is to wait for cache invalidation. Though you can replace your current DNS provider with another one who won't have your domain in his cache. You have all the chances to find such if your domain isn't popular.