blogifierdotnet / Blogifier

Blogifier is an open-source publishing platform Written in ASP.NET and Blazor WebAssembly. With Blogifier make a personal blog or a website.
https://blogifier.net
MIT License
1.29k stars 521 forks source link

Deploy as Sub Site #141

Closed robertmadsen closed 4 years ago

robertmadsen commented 5 years ago

I want to deploy Blogifier as a subsite (that is, in a folder) of an existing website. This way I can access the blog by http://existingsite.com/blog/

The existing site is hosted as an Azure app.

I have successfully downloaded and built the standalone Blogifier code. What must I do to do the same except as a sub-site as described above?

rxtur commented 5 years ago

This is not really supported. Taking dependency on another application opens up can of worms, with number of scenarios to support going up exponentially. The "parent" application can be very different and what works for one does not work for others.

alexkusuma commented 5 years ago

@robertmadsen Can you convert the sub folder into application? If you can, you then assign it to a new worker running .netcore. You then deploy the compiled code into the sub folder. That way IIS will treat them as separate applications, but visitors can access them as you planned: existingsite.com/blog/ for blogifier and existingsite.com for the existing engine. I deployed something like that a month ago on my iis web server and it works well; i didn’t host them as azure apps, though.

robertmadsen commented 5 years ago

Thanks. I will give this a try.

fordprefect480 commented 5 years ago

@robertmadsen I have almost the exact same setup and want to do the same thing. Please report back if you get it working.

robertmadsen commented 5 years ago

Here is were I am at. Our site is http://synaptixgames,com. I created a subfolder called blog. I went into Azure portal for the site at Configuration/Path mappings and added blog as a Virtual application or directory at the Physical Path site\wwwroot\blog, then published the blog to http://www.synaptixgames.com/blog.

Some of the files end up correctly at http://synaptixgames.com/blog, but all of the dynamic content, such as the data and posts, still get generated at the root http://synaptixgames.com.

I figure there is something I'm missing...some setting that indicates that the blog application should treat http://synaptixgames.com/blog as the root of that application.

Anyone have any ideas? @alexkusuma I was trying to implement your idea but couldn't quite figure it out. For example, VS won't allow me to precompile the blog app when I publish it. Usually this option comes up in the publish dialog.

alexkusuma commented 5 years ago

Hi Robert,

Have you check the routing table/route settings ? What happen if you add /blog as prefix for all of the routes? I hope this helps.

Cheers, Alex

From: Robert Madsen notifications@github.com Sent: Thursday, 9 May 2019 6:13 AM To: blogifierdotnet/Blogifier Blogifier@noreply.github.com Cc: Alex Tjahjana alex@alextjahjana.com; Comment comment@noreply.github.com Subject: Re: [blogifierdotnet/Blogifier] Deploy as Sub Site (#141)

Here is were I am at. Our site is http://synaptixgames,com. I created a subfolder called blog. I went into Azure portal for the site at Configuration/Path mappings and added blog as a Virtual application or directory at the Physical Path site\wwwroot\blog, then published the blog to http://www.synaptixgames.com/blog.

Some of the files end up correctly at http://synaptixgames.com/blog, but all of the dynamic content, such as the data and posts, still get generated at the root http://synaptixgames.com.

I figure there is something I'm missing...some setting that indicates that the blog application should treat http://synaptixgames.com/blog as the root of that application.

Anyone have any ideas?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/blogifierdotnet/Blogifier/issues/141#issuecomment-490592933, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADC4GW2ZKDU6R3KE7Y7GTVLPUMJZJANCNFSM4HGEGSJQ.

rxtur commented 4 years ago

Closing old comments to avoid confusion, lots changed.