Category: SelfHost

  • Gittea and Apache Config

    So Gittea has been set up for quite a while now, due to me changing everything to HTTPS it screamed at me when i was in the admin config that my proxy is not giving it the right headers… so i googled… and i was told about ”’mod_headers”’ but i was not able to find it through “apt search mod_headers”, that was because that package got… split up? so the thing i needed to get was ”’mod_xforward”’ because that’s what i needed.

    Oh also! its not “X-Forward: https” anymore, it’s now “XForward On” and yea it just does it automatically now *shrug*.
    Then Gittea complained that the ”’ROOT_URL”’ isn’t the same as it is detecting, so i had to go into the “app.ini” to change the little “http…” to “https…”.

    And voila, no complaints.

  • WordPress Selfhost

    If you ever want to host your own WordPress instance, use a x86 based server… not an ARM based server… it will save you alot of pain

    WordPress ssl

    If you are like me and you dont like to have a warning everytime someone enters your site, get ssl! i did it with Apache2 and certbot.

    Now the site usually doesnt work at that point bc theres alot of http hardcoded… it took me a bit but i got the solution:

    # run in wp-includes
    sudo find . -maxdepth 1 -type f $(printf "! -wholename ./%s " $(cat ignore-files.txt)) -exec sed -i 's/http/https/g' {} +
    sudo find . -maxdepth 1 -type f $(printf "! -wholename ./%s " $(cat ignore-files.txt)) -exec sed -i 's/httpss/https/g' {} +
    
    sudo find . -type f -exec sed -i 's/get_https_origin/get_http_origin/g' {} +
    sudo find . -type f -exec sed -i 's/wp_https_validate_url/wp_http_validate_url/g' {} +
    
    # ignore-files.txt :
    rest-api.php
    ignore-files.txt
    js/dist/url.js
    Requests/src/Transport/Fsockopen.php
    Requests/src/Transport/Curl.php
    update.php
    sitemaps/class-wp-sitemaps-provider.php
    functions.php
    http.php
    rest-api/endpoints/class-wp-rest-pattern-directory-controller.php
    #

    if it helped you, you are welcome.