Jump to content
Froxlor Forum

kingsley ezenwa

Members
  • Posts

    123
  • Joined

  • Last visited

Posts posted by kingsley ezenwa

  1. Currently, NGINX FastCGI_cache (aka Micro Cache) works with FROXLOR but had to place the codes in Server block rather than within the  location ~ \.php$ {} block   OR   location @php$ {} block . 

    And I want to assume you can't have more than 1 (one)    location php$ {} blocks or is that possible.

     

    Also Is it even possible to place codes within the location ~ ^(.+?\.php)(/.*)?$ {    block

    Also how is this file  207c8135c938fb25f460eac93b8d7fe3.htm  generated ?
    Maybe I can look into it and do things in it directly.
    Am almost there as it's working though not just updating it's self as it should. 


        location ~ ^(.+?\.php)(/.*)?$ {
            try_files /207c8135c938fb25f460eac93b8d7fe3.htm @php;
             <!--Can I place something here-->
        }

        
        location @php {
            try_files $1 = 404;
            
            include /etc/nginx/fastcgi_params;
            fastcgi_split_path_info ^(.+\.php)(/.+)\$;
            fastcgi_param SCRIPT_FILENAME $document_root$1;
            fastcgi_param PATH_INFO $2;
            fastcgi_pass unix:/var/run/1-user-example.com-php-fpm.socket;
            fastcgi_index index.php;
        }

     


     

  2. Finally Got to make NGINX Micro Cacheing Work   but am having a little issue making me ask this question

     

    Normally, while creating vHosts for website without using FROXLOR or anyControl Panel, Nginx  php location block is 
     

    location ~ \.php$ {}

     

    BUT vHosts created by FROXLOR use this location block 

    location @php$ {}

     

    Wants to know if it's possible to change/swap these it even in the codes.

    That is because on a Server without any Control Panel, Creating vHosts manually for NGINX , the FastCGI cache for NGINX get's added under the location ~ \.php$ {} block .

    Currently, adding same code under the  location @php$ {} block causes an error - probably 404 error  OR Access Denied error

    and While it currently works being added in the Server Block, the Cache refuses to refresh even after expiring .
    When I look in cache directory, I can see new cache files created BUT still Old ones still gets served.

    The only solution at the moment is to manually delete cache folder and restart NGINX after which the websites updates.

  3. I want to know what Frameworks were used in developing FROXLOR.

     

    Asking because am enhancing most of the sketchy features i implemented earlier and need to know a few things first.

     

    Want to  know  if a CSS framework was used and what name it is.
    Also want to know if a PHP framework was  used and it's name
    and any other Frameworks and/or major Library that I might know of so I read up the documentation .

    Am asking all these because making direct modifications wasn't so easy especially working with the form fields and form submissions.

     

    Had to create separate pages entirely to be able to implement the things i did BUT going forward, want to do modifications directly.

  4. What I have tried

    I added the below

     if (!-e $request_filename) {
            rewrite ^(.+)$ /index.php?q=$1 last;
        }
        location ~ \.php$ {
            # Setup var defaults
            set $no_cache "";
            # If non GET/HEAD, don't cache & mark user as uncacheable for 1 second via cookie
            if ($request_method !~ ^(GET|HEAD)$) {
                set $no_cache "1";
            }
            # Drop no cache cookie if need be
            # (for some reason, add_header fails if included in prior if-block)
            if ($no_cache = "1") {
                add_header Set-Cookie "_mcnc=1; Max-Age=2; Path=/";
                add_header X-Microcachable "0";
            }
            # Bypass cache if no-cache cookie is set
            if ($http_cookie ~* "_mcnc") {
                        set $no_cache "1";
            }
            # Bypass cache if flag is set
            fastcgi_no_cache $no_cache;
            fastcgi_cache_bypass $no_cache;
            fastcgi_cache microcache;
            fastcgi_cache_key $server_name|$request_uri;
            fastcgi_cache_valid 404 30m;
            fastcgi_cache_valid 200 10s;
            fastcgi_max_temp_file_size 1M;
            fastcgi_cache_use_stale updating;
            fastcgi_pass localhost:9000;
            fastcgi_pass_header Set-Cookie;
            fastcgi_pass_header Cookie;
            fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_param  PATH_INFO          $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED    $document_root$fastcgi_path_info;
            #fastcgi_intercept_errors on;
            include fastcgi_params;
        }

    into a file named microCache.conf and with the help of include 

    e.g include /etc/nginx/microCache.conf;

    i added it to FROXLOR's Default vHost-settings for NGINX so it gets included in all website's vHost files AND i can confirm the line   include /etc/nginx/microCache.conf;   is added in all vHosts files for websites.

    But a look at this directory /var/cache/nginx2 shows it's empty even after visiting most of the websites so the files gets generated.

     

    Another observation is that the file above adds another Location block  location ~ \.php$ {} while FROXLOR add a similar Location Block location @php {} .

    Any how to append the content of the file above microCache.conf into the Location Block location @php {} added by   FROXLOR.

    Have tried editing one of the website's vHost file to add it manually yet it refused to work.

     

  5. 2 hours ago, d00p said:

    "It's not working" is not a helpful message. What did you try? What changes are needed in the config fpr micro-cache to work? Are there any error-messages? etc.etc.etc.

    I think it's better i paste here a short tutorial for you to understand as pasting what worked for me while I was not using Control Panel would be confusing for you.

     

    The below should go into the concerned website's vHost file under the server block

        if (!-e $request_filename) {
            rewrite ^(.+)$ /index.php?q=$1 last;
        }
        location ~ \.php$ {
            # Setup var defaults
            set $no_cache "";
            # If non GET/HEAD, don't cache & mark user as uncacheable for 1 second via cookie
            if ($request_method !~ ^(GET|HEAD)$) {
                set $no_cache "1";
            }
            # Drop no cache cookie if need be
            # (for some reason, add_header fails if included in prior if-block)
            if ($no_cache = "1") {
                add_header Set-Cookie "_mcnc=1; Max-Age=2; Path=/";
                add_header X-Microcachable "0";
            }
            # Bypass cache if no-cache cookie is set
            if ($http_cookie ~* "_mcnc") {
                        set $no_cache "1";
            }
            # Bypass cache if flag is set
            fastcgi_no_cache $no_cache;
            fastcgi_cache_bypass $no_cache;
            fastcgi_cache microcache;
            fastcgi_cache_key $server_name|$request_uri;
            fastcgi_cache_valid 404 30m;
            fastcgi_cache_valid 200 10s;
            fastcgi_max_temp_file_size 1M;
            fastcgi_cache_use_stale updating;
            fastcgi_pass localhost:9000;
            fastcgi_pass_header Set-Cookie;
            fastcgi_pass_header Cookie;
            fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_param  PATH_INFO          $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED    $document_root$fastcgi_path_info;
            #fastcgi_intercept_errors on;
            include fastcgi_params;
        }

     

    The below is meant to go into nginx.conf file under the http { } block

    fastcgi_cache_path /var/cache/nginx2 levels=1:2 keys_zone=microcache:5m max_size=1000m;
    log_format cache '$remote_addr - $remote_user [$time_local] "$request" '
    '$status $upstream_cache_status $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "$http_x_forwarded_for"';

     

    Above were copied and unmodified from a tutorial as it's leaner and less confusing for you.

  6. Back in the days while doing Hostings without Control Panel, I was able to use NGINX with Micro Cache. Stopped laterafter moving on to ISPConfig 3 then FROXLOR .

    I now want to resume that again BUT am unable to get it to work with FROXLOR.

    Any idea how or why it isn't working would be greatly appreciated.

     

  7. I suddenly started getting such errors on an already Active FROXLOR installation in Production.

    Though the error only appears while I try navigating to the Admin Settings page, every other pages works perfectly Okay.

    What I did to remedy it was to edit FROXLOR's config file in /lib  directory and change  127.0.0.1   To   localhost .

    Yet to really understand why that suddenly started anyway.

  8. Am setting up another Fresh server and thinking if I can this time around replace MariaDB with Percona Server.
     

    Latest versions of MariaDb (v10.2 and 10.3) seems to be more Ram Hungry  than MariaDB 10.1 .

    And since I have read so much about Percona server and they really are after performance, am thinking to use it this time around.

    Since it's a drop-in replacement of MYSQL just like MariaDB, I want to believe it would play very nice with FROXLOR .

     

    Also apart from php7.0, will the most recent version of php which is php7.2 play nice with FROXLOR

  9. On 9/22/2018 at 9:17 AM, d00p said:

    He clearly said he just did not read out guide...so...

    My understanding is that He didn't read the Guide on FROXLOR's page.

    Most people i know got to know about FROXLOR via the numerous comparisons done on blogs (most of which are Copy & Paste with little to no modifications).
    So they just follow the instruction until the end.

    It's when they are unable to make use of things that they keep searching till they find the forum where questions and answers are found.

     

     

    My Suggestion : 
    A well detailed tutorial/guide can be made and a link placed on the download page in such a well it's easily visible to anyone on that page.
    Can't  remember the number of days and all the stress it took me till a member on the chats section sent me a link to a page i had to translate to understand.

    And that was the deal breaker .

     

    FROXLOR is nice, Neat and uncluttered - major reason i abandoned ISPConfig 3 (UI looks like it was designed before the birth of Abacus) which was working perfectly for me.

  10. 9 minutes ago, Pro-Webs said:

    Nope. The http to https redirect works with the configuration above.

    I need a solution to redirect to www from non-www including https.

    Look this site: https://www.digitale-fotografien.com/

    You want to be redirected ever to https. But if you write https://digitale-fotografien.com/

    You will not be redirected to www.

    Okay

    Now I get what you mean.

     SSL and https already working on your FROXLOR installation.

    WWW.google.com is different from google.com

    What are you looking for is Server Alias.

    Hit's done via FROXLOR interface.

    1. Log into FROXLOR as an admin
    2. Go to Domains and click on the domain you want redirected. 
    3. While editing the domain on Froxlor's interface, look for this text     ServerAlias value for the domain: It has a drop-down of where you can select either   WWW   or   Wildcard (*.domain.tld)   or No Alias .  Just select www
    4. Also make sure WWW has an A record in your DNS so it works well.

    Sorry not used to writing tutorials as am often always very busy to relax and type.

    Hope this helps.

  11. On 8/16/2018 at 6:07 PM, Robert xZarex said:

    Hello, 

    Yesterday I set up Froxlor on a new VPS with Debian 9 and carried out the configuration (if necessary). 

    Today I had to change the IP of the server. For this I used the Switch-IP script (which is in the same folder as the master_cronjob). 

    This has worked so far and the configured websites are also running without problems. 

     

    Unfortunately, the Froxlor panel has been causing problems since then. I am logged out with the Adminaccount after 1-2 clicks. 

     

    Unfortunately, I can not find anything in the Apache error logs, and otherwise I have no idea where to look. 

     

    Maybe somebody here can help me :)

    Best regards

    Have experienced this issue myself also.

    Are you sure you have adjusted the Time it stays before logging you out from FROXLOR  Settings  ->  Account settings  and adjusting the Session Timeout which is set at 600 by default.

    Also try changing your browser to see if it solves the issue.

    Another thing I have noticed is that sometimes, your ISP (Mobile network carrier / Internet company) might be the cause also.
    Have seen instances where I keep being logged out using the Popular CPanel with Hostgator and Godaddy but that stopes as soon as I change my Internet network.

     

    These are my suggestions which you can also try.  
    This isn't specific to FROXLOR and neither is it an issue with FROXLOR .

  12. 17 hours ago, Pro-Webs said:

    I'm using a nginx server, so .htaccess solutions will not work for me.

    I want that all requests will be rewrite to https: //.www, i have only the vhosts in froxlor to use for it.

    http://domain.de -> https://www.domain.de

    http://www.domain.de -> https://www.domain.de

    https://domain.de -> https://www.domain.de

    www.domain.de -> https://www.domain.de

     

    If I understand you rightly, you want url  e.g  http://google.com   to redirect to  https://www.google.com .

     

    This is very simple and can be done directly via FROXLOR's web interface.

     

    First, you need to activate SSL on FROXLOR

     

    Firstly, we need to know if you already have FROXLOR running properly or you are yet to install FROXLOR.

    You posting NGINX  styled vhosts file kind of confuses me.

    Need to know the following

    1.  Is FROXLOR already installed ?
    2.  If FROXLOR is already installed, is FROXLOR running without issues or errors ?
    3.  Do you have SSL enabled already ?
    4.  What Linux Distro (e.g CentOS, Debian, Ubuntu, etc) are you running ?
    5.  Anything else you can add

    we need answers to the above to know where to get started.

    If you want things faster, drop many more clues so we ask less questions OR  you send me your server login so I take a look BUT you need to know that you have got to trust me to begin with.

    Bye for now

  13. Make sure Nginx and PhP-FPM are both running with no errors.

    Also I believe you are a developer or a programmer - Saying something doesn't work without stating what error you got won't help much.

     

    We need to know what errors you got  e.g 404, 503, etc.

     

  14. AM sorry I had to translate your question to understand it.

    If you speak english, I will be able to help.

    You really need to at least understand Nginx .

     

    Also your question isn't clear enough and is incomplete to me.

     

    Kindly make things clearer to receive help.

    Thanks

  15. 15 hours ago, Ivan Slišković said:

    I have made mistake and I install WP before Froxlore. Using this example http://sliskovic.online/install-froxlor-centos7/

    Now my question is; how to "import" this site into Froxlor ? Can I just copy all files into default site structure?

    Yea BUT you would end up making things more complex.

     

    A simpler solution would be to Reinstall the wordpress website OR  copy Over the files to Froxlor and import the database to the database created and managed by FROXLOR

  16. Wow

    No response. I have been noticing this for a while now most especially to my threads.

    Guess it's time I realize I get no support whatsoever EXCEPT the question is considered Highly Worthy to be asked by a System Admin..

     

    Probably I find my way to the Chat room so maybe a fellow User might be of help.

    Well no issues.


    Thanks

×
×
  • Create New...