Lifeboat: does it disable wordpress api?

I have a Lifeboat managed VPS (Ubuntu Server 22.04), where I defined a static path to a Wordpress instance on that server. I noticed, that the Wordpress REST API seems to be disabled or not reachable, and I am not able to find out why.

https://mainwp.nwscloud.ch/wp-json should actually return some json, indicating the API is functionable, but it does not. I have not disabled the REST API myself.

Could it be, that Lifeboat is configuring nginx in a way that will not allow access to the REST API?

I think in the Server Tools tab there is an option somewhere to enable/disable WordPress.

1 Like

I think Jeremie is talking about ā€˜WordPress Trapā€™ on Lifeboat, that option can be used if you donā€™t have WordPress installed.

1 Like

The Wordpress trap option is unchecked (off) in my settings. I am able to access a number of URLs which contain wp- on my site, except the one for testing the REST API (https://mainwp.nwscloud.ch/wp-json)

To be more precise: When I am logged in to the Wordpress site, then the REST API is responding. But it remains disabled for logged out users. I know that there is a Wordpress plugin which is doing exactly that, but I have not installed it.

So at the moment I am clueless and Iā€™m still trying to exclude nginx configuration as a possible culprit.

Lifeboat help says:

Enable WordPress trap activates a special Fail2Ban configuration built to ban any address that requests a URL which contains wp- and fails with a HTTP Status other than 2xx or 3xx. The rule bans an attacking IP Address from using the HTTP/80 and HTTPS/443 ports for 10 hours.

For servers without WordPress installed, this increases security and reduces time wasted with bad actors who scan for commonly vulnerable website software. This trap is only for use on a server that does not have WordPress installed!

Hi Oliver,

Wordpress installations come set up to handle some of the fun URL things through Apacheā€™s .htaccess configuration system. To achieve the same thing in nginx the config needs to be written to have mod_rewrites that operate in the same way. Basically, Lifeboat probably needs a ā€œmod_rewrite for Wordpressā€ option.

Over the years many people have emailed me about Wordpress support, but no one has ever said ā€œhey this is broken for meā€ so Iā€™ve never spent the time to look into it. What strikes me as odd is that the API URL works for you when logged in. Iā€™m poking around Wordpress + nginx documentation now. I will have an update later.

Best wishes,
Tim Parnell

3 Likes

Thank you to @Jeremie_L and @AlbertoD for taking the time to help!

2 Likes

Back with an update!

I have added to Lifeboat the configuration necessary for WordPress (and the SEO friendly links).

Until an official release, you can download this Pre-Release Build 208. This build features ā€œmod_rewrite for WordPressā€ on the Static Files Options tab. Enable this option for your WordPress install and both the API and pretty-links will function as expected. A silly side note: for now, it is indeed possible to activate both the mod_rewrite for WordPress and the WordPress Trap at the same timeā€¦ :upside_down:

Pre-Release Build 208
Mac: Download LifeboatMac_pre_208.zip
Windows: Download LifeboatSetup_pre_208.exe

Donā€™t forget to tell your friends about Lifeboat :smiley:
Please let me know if I can be of any further assistance!

8 Likes

Fantastic! Iā€™ll be back at my computer early next morning and report back then.

What an awesome piece of software, with outstanding support!

Lifeboat makes putting up a VPS with webservices a piece of cake!

2 Likes

Yes! Now my MainWP Wordpress Management Console is no longer complaining about disabled REST API and the endpoints I use are working as expected!

Great work! Thank you very much! :+1: :+1: :+1:

5 Likes