Jump to content

Recommended Posts

Posted

Hi,

We want to use the API and the REST API instructions are telling us to put a .htaccess file into the API folder, however, we're not running an Apache server, but Nginx, so this won't work - right? Advice on how to set this up would be greatly appreciated - thanks!

Could contain: Text

Posted

I'm afraid, only Apache is supported. If you want to use NGINX, you would need to work with your server administrator to translate the .htaccess rules to NGINX. There may be someone here who has already done so but please keep in mind, if any issues arise from your server configuration, they would be on yourself to resolve.

  • 9 months later...
Posted
On 5/17/2023 at 11:59 AM, Jim M said:

I'm afraid, only Apache is supported. If you want to use NGINX, you would need to work with your server administrator to translate the .htaccess rules to NGINX. There may be someone here who has already done so but please keep in mind, if any issues arise from your server configuration, they would be on yourself to resolve.

Hi, I've tried finding a solution to this problem and it seems this is the blanket response you guys throw on every post.  You say Nginx isn't supported, yet when purchasing your expensive software, it clearly states Nginx is supported, and that your app works on all modern web servers. Nowhere on that page does it even recommend you use apache, which personally, I don't use, because I have other apps running.
https://invisioncommunity.com/buy/self-hosted/

The issue isn't that the API isn't working. The issue is that the check in the api CP does not work which makes creating api keys impossible.

I can hit the api no problem with my rules. the response I get hitting core/hello is
{
    "errorCode": "2S290\/6",
    "errorMessage": "NO_API_KEY"
}
Obviously this means the API is working... why doesn't the Admin CP realize that? (it keeps showing the page up top) what kind of check is it performing? I don't see any requests to the api in the access logs except when I hit it.

 

For reference here is my Nginx server block which was converted from htaccess

 

location /api/ {
  if (!-e $request_filename){
    rewrite ^/api/(.*)$ /api/index.php;
  }
}

  • 5 months later...
Posted
On 2/25/2024 at 6:44 PM, drodrodro said:

Hi, I've tried finding a solution to this problem and it seems this is the blanket response you guys throw on every post.  You say Nginx isn't supported, yet when purchasing your expensive software, it clearly states Nginx is supported, and that your app works on all modern web servers. Nowhere on that page does it even recommend you use apache, which personally, I don't use, because I have other apps running.
https://invisioncommunity.com/buy/self-hosted/

The issue isn't that the API isn't working. The issue is that the check in the api CP does not work which makes creating api keys impossible.

I can hit the api no problem with my rules. the response I get hitting core/hello is
{
    "errorCode": "2S290\/6",
    "errorMessage": "NO_API_KEY"
}
Obviously this means the API is working... why doesn't the Admin CP realize that? (it keeps showing the page up top) what kind of check is it performing? I don't see any requests to the api in the access logs except when I hit it.

 

For reference here is my Nginx server block which was converted from htaccess

 

location /api/ {
  if (!-e $request_filename){
    rewrite ^/api/(.*)$ /api/index.php;
  }
}

Did you ever figure this out?  We have added these conversions for htaccess, but still not getting anywhere with the API.

  • 4 months later...
Posted (edited)

Using Apache should have been in the instructions under server requirements, or somewhere in the installation document. I normally use nginx, since there were not specific instructions about which web server to use, I just used what I was more familiar.

I have successfully created a nginx /api block that seems to be working, this will go inside your server { block. (verify your php with 8.3, or locate the correct directory):

    # Add API-specific configuration
    location /api/ {
        # Pass the Authorization header to PHP
        set $http_authorization $http_authorization;

        # Serve existing files or route to index.php
        try_files $uri $uri/ /api/index.php;

        # PHP processing for the API
        location ~ \.php$ {
            include snippets/fastcgi-php.conf;
            fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

            # Pass the HTTP_AUTHORIZATION header to PHP
            fastcgi_param HTTP_AUTHORIZATION $http_authorization;

            include fastcgi_params;
        }
    }

Edited by Code Name Jessica
Added a configuration that worked.
Posted
3 hours ago, Code Name Jessica said:

Using Apache should have been in the instructions under server requirements, or somewhere in the installation document.

Keep in mind that the software works under these other web servers but we do not support them. We state this under our standards of support:

Invision Community - Standards of Service - Invision Community

Quote

To obtain technical support, your hosting environment must meet the minimum requirements as outlined on our purchase page. We strongly recommend LAMP (Linux Apache MySQL PHP) environments. Technical support for non-Apache based web servers may be limited. We do not recommend or provide support for Windows server environments.

Please also note that PHP 8.3 is not yet support either. Invision Community 4 still requires PHP 8.0 or 8.1.

Posted (edited)
58 minutes ago, Jim M said:

Please also note that PHP 8.3 is not yet support either. Invision Community 4 still requires PHP 8.0 or 8.1.

Yeah, thank you, I am playing with fire 🙂 -- It's my normal go to. I have a metrics dashboard that I created that specifically uses something like this:
$isValid
= json_validate('{"name":"John"}');

That became available in 8.3, whereas 8.1 doesn't. Since I have been playing with Matomo lately, I may scrap my 270 hours of programming metrics.jbrowns.com, but I already had 8.3 installed.
 

58 minutes ago, Jim M said:

Using Apache should have been in the instructions under server requirements, or somewhere in the installation document.

When I was trying to find a replacement for NodeBB (self-hosted version), which required reverse proxy, I was not expecting to spend $500 on a forum (and other things, I know) system but I just became overwhelmed and extremely frustrated with Theme development for NodeBB. Before I paid the money, I ran the system checker script and noticed the warning about 8.3, but nothing about nginx or php-fpm. My website is actually on: https://codenamejessica.com 


I also have my dynamic Badge.io (quotes.codenamejessica.com) script that runs with NodeJS so I still use a reverse proxy for that. That I use in my signatures:
 CodeName: Jessica

💻 Linux Enthusiast | 🌍 Adventurer | 🦄 Unicorn 
🌐 My Site | 📢 Join the Forum

9wqynsG.png.c5b8c0f1ddc4aca830a3e2baaa25b9a9.png

random-quote&cacheSeconds=10&style=for-t

 

Although I can move that to jbrowns.com pretty easily, the installation manual located here:


has no information on apache, or nginx. So, I was assumed it was fine either way. I think it should say somewhere on that page: Apache is supported, use nGinX and go with the Server Gods as they may. (Something like that)

Edited by Code Name Jessica
I can't English
Posted

Appreciate the feedback. Currently, as mentioned, popular web servers, such as NGINX, work but are limited/not supported. For support information, it can be found at the link.

Posted
Just now, Jim M said:

Appreciate the feedback. Currently, as mentioned, popular web servers, such as NGINX, work but are limited/not supported. For support information, it can be found at the link.

I truly appreciate that information. I believe that if it stated in the installation document, when I wiped my server, I would have chosen items for specifically this application. Although it doesn't say anything about nginx, apache, or Windows in the installation document, it also doesn't say in the configuration checker script (I don't know anything about Windows).

Look, I am a nobody compared to some of the people IPS sells to, congratulations on that success, it is very well appreciated and visible, the software does exactly what you would expect it to do as promised and I am expecting to continue the $200/year contributions as well.

But down to the brass tax, the only place I found it was in a link you provided. I wasn't looking at support services, as I am a senior Linux administrator, and have been for over 30 years now (God I am old). I am not complaining, I am not bad mouthing, I am not ill-willed over the situation, and I know how to fix it. What I am getting at, is if a server environment is not going to be supported, then this statement:

Quote

To obtain technical support, your hosting environment must meet the minimum requirements as outlined on our purchase page. We strongly recommend LAMP (Linux Apache MySQL PHP) environments. Technical support for non-Apache based web servers may be limited. We do not recommend or provide support for Windows server environments.

image.thumb.png.afb39c55c1eaa09c7abd2c3d8857829d.png

and then don't forget to click on the terms:
image.png.3d6a8502a551e209e6fed850396b6942.png

and then don't forget to go through each of these links:
image.thumb.png.58809c7cd62fbc3221c048b3def48584.png

Should be MUCH clearer to people before they fork out the $$$. It should be screamed from the rooftops, it should be in the compatibility checker, it should be in the installation docs. Also, that line should read "Technical support for non-Apache based web servers may WILL NOT be limited SUPPORTED"

Posted (edited)

I use Windows Server 2022 and 2025. I do get a warning in my dashboard about running Windows Servers. Been on Windows since 2001. Never had any problems with any version of IPB.

I'm not sure when support for anything but lamp was started. When I started on 1.5 Windows was supported. When I left IPB while running 3.4 Windows was still supported. I remember giving Matt or Ryan, can't remember which for sure, admin access to the server to troubleshoot a problem. Problem was fixed.

In any case as long as you have the knowledge and it seems you have tons you can make it work. Sorry to hijack your thread.

Edited by Cloaked
Posted
27 minutes ago, Cloaked said:

I use Windows Server 2022 and 2025. I do get a warning in my dashboard about running Windows Servers. Been on Windows since 2001. Never had any problems with any version of IPB.

I'm not sure when support for anything but lamp was started. When I started on 1.5 Windows was supported. When I left IPB while running 3.4 Windows was still supported. I remember giving Matt or Ryan, can't remember which for sure, admin access to the server to troubleshoot a problem. Problem was fixed.

In any case as long as you have the knowledge and it seems you have tons you can make it work. Sorry to hijack your thread.

Keep in mind that we will do our best to support our software on any server operating system that is compatible but if there is something specific to your operating environment that is causing an issue, that will be outside our scope of support. In line with this topic, we only support Apache so if you want to translate the .htaccess for use in NGINX (or Windows), that is outside our scope of support as we only provide .htaccess for Apache.

For the last decade that I have worked here, we have not supported Windows or any other server environment than Apache. Keep in mind that "supported" just means we will provide advisement on an issue or troubleshoot if it is a software issue. Self-hosting is self-managed so if there is a server configuration or issue, that would fall on the server administrator or hosting provider to perform.

Posted

100% to both of you, and please don't think that I am trying to complain or cause any issues. When I decided to purchase, I specifically looked for "(?si)(apache|nginx)|(server|system)\s+requirements" which returned no results in the document for installing (the first document I shared).

Basically, what I am saying is a little notice should be done on that page and in the system checker. Easy to do, then I would have built the server with Apache. If operating system information was stated and could have used Red Hat over Ubuntu I would have as well, but yet here we are 😄

Again, please don't think I am starting fires here, just trying to help a fellow nGinX'er with the API and putting in a notice that the small little text that states, non-apache/limited support on top of a bunch of other things to read should probably be thought about a little more.

Thanks for all your info!

Posted
1 hour ago, Code Name Jessica said:

Again, please don't think I am starting fires here, just trying to help a fellow nGinX'er with the API and putting in a notice that the small little text that states, non-apache/limited support on top of a bunch of other things to read should probably be thought about a little more.

I can certainly mention this internally. Please do bear in mind however, that you're responding to a topic which is a year and a half old 🙂 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...