Jump to content

Kru-x

Community Developer
  • Posts

    242
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Kru-x

  1. 1 minute ago, Tucubanito07 said:

    I just got it to work. I had to do a subdomain forward like the example you noted above and it works. I was doing dns instead of subdomain forward. Dee dee me. Thank you. What do you suggest if I decide later on down the line to make another site. Just fire up another container for Wordpress and another MariaDB? I will still keep the same NginxProxyManager and forward to the other Wordpress instance I just created. I believe that is the beat way correct?

    Corecctemundo, you can fire up as many instances of WP as you like and NPM can direct to each and everyone of them on a new domain. Or like me, just add a subdomain at your domain provider ex. mysite.com, cloud.mysite.com, music.mysite.com, todo.mysite.com etc etc. and issue a new certificate for each of them.

     

    Kru-x

    • Like 1
  2. 1 minute ago, Tucubanito07 said:

    Couldn’t I have two certs? One for www.yoursite.com and then another one for yoursite.com? I have tried placing them together on the same cert and can seem to get it to work. Again, not a big deal but just a thought that’ all. 

    Yea, in NPM just add a Redirection Host with domain name "www.yoursite.com" and redirect to "yoursite.com" and under SSL request a new let's encrypt certificate, then you get a new certificate for  "www.yoursite.com", then if anyone uses www.yoursite.com they will be redirected to the right address.

     

    On the other hand why would you need to :~), if a user use www just polity ask him not to, just an interesting exercise though! 🙂

     

    Kru-x

    • Like 1
  3. 11 hours ago, Tucubanito07 said:

    I did not know that https://www.yoursite.com is not the same as https://yoursite.com. I thought it was the same just missing www.  I have tried redirecting the site with NginxProxyManager and It just does not work. Just weird that’s all. Thank you for your input. 

    I have my sites registered with Godaddy and they have added www as a subdomain already, guess yours is the same. www in front is "old school" and is not much in use today, but some use it and therefore the domain registrar add it automatically.

     

    You should be able to redirect your www.yoursite.com to yoursite.com and you have to ask letsencrypt for a new cert for www.yoursite.com, that is how yo do it with a subdomain. I was curious about the problem and it worked fine doing it with mine

     

    Kru-x

  4. 6 hours ago, Tucubanito07 said:

    I got a question for you. I got google domains and every time I go to for example.com my site comes up. But if I go to www.example.com it can’t connect to it because it not secure. Do you know what this mean? I have been trying to get the website to accept https://www.example.com and it does not work but if I do https://example.com it does. Just weird. 

    What I gather is that the https://www.yoursite.com is another domain, so it is directing to a site that wont exist (remember I said that I have a domain called cloud.mysite.com that I have NextCloud on, just the same). If you feel that is a problem you can redirect that site to yoursite.com.

  5. Just now, Tucubanito07 said:

    I got it fixed. There was a port in the Proxymanager that was 8080 and i believe that was messing it up. I switched it to 8088 and the cleared my cookies and now i am using my domain to do the installation. Boy this was a pain. Dude you are amazing. Thank you so much for all your help. Thank you thank you.

    Puhh, I am glad it worked! No worries, have fun "home site'ing"!

    • Like 1
  6. 2 minutes ago, Tucubanito07 said:

    Ok so i deleted both MariaDB and Wordpress. I also deleted the SSL in Proxymanager and did a new one. However, when i go to my domain in Proxymanager, it takes me to port 8080 and not 8085.

    If you go to 10.10.7.4:8085 in your browser what happens, WP installation screen? or? Forget about the proxy!

    • Like 1
  7. 11 minutes ago, Tucubanito07 said:

    What folder do you want me to delete? After deleting both folders you want me to delete. Do you want me to delete both container Word press and MariaDB?

    Each container and the folder for that container in app data, depending on how you named them, marked in blue! Eg. both WordPress and the WordPress mariaDB.

     

    Screen Shot 2020-05-19 at 7.55.24 am.png

  8. 10 minutes ago, Tucubanito07 said:

    If i go to 10.10.7.4:8080 I can see my website. I cannot see it outside because i am not able to use my domain to reach it.

    Then it must work, delete BOTH folder again, reinstall and see if you can connect locally. Do not start installation at this time just close it. Then try to adjust the proxy the same as for nextcloud. When you can see the WP installation with your external address you should be good to go! 

  9. 2 minutes ago, Tucubanito07 said:

    Proxynet is just a name for a network that i created a long time ago when i was using Letsencrypt. Nextcloud, Bitwarden, and Wordpress is on the same network (Proxynet). Also, i changed the port to 8083 and nothing.

    I think this could be your problem, there was another guy trying and I am not sure if the WP container can talk to the DB on different network types, this is over my head. But I don't understand that people do, I have all my containers on bridge'd network. But strange thing is that you sent a screenshot where it looked liked you could connect to the wordpress installation, have you ever got that far? Eg. been able to connect to it by using 10.10.7.4:8080 in your browser?  

  10. 1 minute ago, Tucubanito07 said:

    Yes. Bitwarden as well. That why i am so confused. Do i have to place my domain in WordPress Address (URL)?

    Then the proxy is working as it should. A WordPress address has nothing to do with it, you can direct any address to any container so you can use whatever. let say you have youraddress.com directed to the WordPress container, then you have yourcloudaddress.com (or as me cloud.myaddress.com) directed to the nextcloud container etc. etc. But it is important that you start the WordPress installation when your address is working, not before. Else WordPress redirects (thinks) it is on the internal address eg. 10.10.7.4:8080/mypage  and then you will get a 404 error or proxy error.

  11. 5 minutes ago, Tucubanito07 said:

    I am using my main domain. For example: mywebsite.com instead of wordpress.mywebsite.com. I dont think that is an issue but just wondering. @Kru-x

    Yea you should, is nextcloud working and you can connect to it with your external address(through proxymanager)?

  12. 17 minutes ago, sjoerd said:

     

     

    Sorry for the late reply. I will look into it when I got my site running as I want it. Been bit hectic around here right now. Is seem like I should be moving to docker but I got little time to dig in (and maybe a little time is all i need - i know)

    But you have time to "sudo" install packages? ;-) That's when my head starts spinning. For simple things like using standard containers in unraid, you really don't need to know much about it, just the settings. But you'll love docker and the power of it if you dig in to it and you get the hang of it!

    • Thanks 1
  13. 5 minutes ago, Tucubanito07 said:

    This is how i have it setup now.

     

    Ok,

    Is your unraid server IP 10.10.7.4 ? What container port are you using for WordPress?

    • the port 9999 was just an example and should be the port of your WordPress container (or any container port that you forward to).
    • Only use Forward SSL check until you have it working
    • Have you redirected your routers port 443 & 80 to NginxProxyManager's ports?

    And do not start the WordPress installation until you have this above working and you can connect to it with your google address, eg. delete both folders and reinstall bot containers as per what I mentioned earlier.

  14. 6 hours ago, Tucubanito07 said:

    I have to try this after I am done with work. The reason why I want to use linuxserver Letsencrypt because I have a reverse proxy. The application you are referring to does not I believe. Thank you so much. I will update when I try to see if it works with the NginxProxyManager.  However, I was trying to do it last night and it said that my domain already had a cert. so I removed my domain from the linuxserver container and I will try later to see if it lets me. 

    NginxProxyManager is a reverse proxy manager with nginx & letsencrypt built in, it can handle all your proxies, read up about it at https://nginxproxymanager.com/guide/

    Add your domain name and direct it to your internal WordPress container, Scheme: http,  Forward Hostname / IP: "server IP (ex. 192.168.1.100)", Forward Port: 9999 then request a new SLL cert with letsencrypt and away you go. Its easy as that!

     

    Kru-x

  15. 4 hours ago, Tucubanito07 said:

    I already have a MariaDB. When I go and try to Intel another one it tells me to edit. I can’t add another container. Sorry I am sorta a noob and learning as I go. 

    You can have as many as you like, just add a new one with a different name ex. my-wordpress-MariaDB then you have to choose a different port. All containers have to have different ports, then in the WordPress template add the ip:port of the DB container. See post: for explanation of settings.

    Hope it helps,

    Kru-x

  16. 9 minutes ago, Tucubanito07 said:

    I am trying to setup so I don’t have so many container that do the same thing. I will have to try it out with NginxProxyManager and see how it is. 

    I get that, but it is better to separate the different systems and pair them together eg my-wordpress & my-wordpress-MariaDB. Then you can toss it away/copy and without risking to bugger up the other one. NginxProxyManager will sort out all your proxied redirections and it is really easy.

    Kru-x

  17. 2 hours ago, Tucubanito07 said:

    I have deleted the container WordPress and deleted the database and user from MariaDB, then i deleted the folder /mnt/user/appdata/wordpress. Now, i have reinstalled everything and tried it again and the admin page does not come up. i check the database wordpress in myphpadmin and there is nothing been created for the database. Can someone please help me figure this out. Thank you.

     

    this is whats on the logs.

    
    AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.5. Set the 'ServerName' directive globally to suppress this message
    AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.5. Set the 'ServerName' directive globally to suppress this message
    [Sun May 17 19:00:49.996054 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.18 configured -- resuming normal operations
    [Sun May 17 19:00:49.996088 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

     

    Did you delete the folder for the MariaDB as well? 

  18. 6 hours ago, Tucubanito07 said:

    Hey guys, I need some help. When i go to the domain i own from Google i get the Welcome to our server from the NGINX. Does anyone have a config that aims NGINX to Wordpress website i am trying to build? 

    This is the config i am using under letsencrypt/nginx/proxy-confs/

     

    # REDIRECT WWW TO https://[domain.com]
    server {
     listen 80;
     listen 443 ssl http2;
     server_name www.domainame.com; 
     return 301 https://domainame.com$request_uri;
    }

    # REDIRECT HTTP TRAFFIC TO https://[domain.com]
    server {
        listen 80;
        server_name domainame.com; 
        return 301 https://domainame.com$request_uri;
    }

    # BLOG SITE
    server {
     listen 443 ssl http2;
     server_name domainame.com;

    ## Source: https://github.com/1activegeek/nginx-config-collection
    ## READ THE COMMENT ON add_header X-Frame-Options AND add_header Content-Security-Policy IF YOU USE THIS ON A SUBDOMAIN YOU WANT TO IFRAME!

    ## Certificates from LE container placement
    ssl_certificate /config/keys/letsencrypt/fullchain.pem;
    ssl_certificate_key /config/keys/letsencrypt/privkey.pem;

    ## Strong Security recommended settings per cipherli.st
    ssl_dhparam /config/nginx/dhparams.pem; # Bit value: 4096
    ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;
    ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0
    ssl_session_timeout  10m;

    ## NOTE: The add_header Content-Security-Policy won't work with duckdns since you don't own the root domain. Just buy a domain. It's cheap
    ## Settings to add strong security profile (A+ on securityheaders.io/ssllabs.com)

    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none; #SET THIS TO index IF YOU WANT GOOGLE TO INDEX YOU SITE!
    add_header Content-Security-Policy "frame-ancestors https://*.$server_name https://$server_name"; ## Use *.domain.com, not *.sub.domain.com (*.$server_name) when using this on a sub-domain that you want to iframe!
    add_header X-Frame-Options "ALLOW-FROM https://*.$server_name" always; ## Use *.domain.com, not *.sub.domain.com (*.$server_name) when using this on a sub-domain that you want to iframe!
    add_header Referrer-Policy "strict-origin-when-cross-origin";

    add_header Feature-Policy "geolocation none;midi none;notifications none;push none;sync-xhr none;microphone none;camera none;magnetometer none;gyroscope none;speaker self;vibrate none;fullscreen self;payment none;";
    #FEATURE POLICY: READ MORE HERE: https://scotthelme.co.uk/a-new-security-header-feature-policy/

    proxy_cookie_path / "/; HTTPOnly; Secure"; ##NOTE: This may cause issues with unifi. Remove HTTPOnly; or create another ssl config for unifi.
    more_set_headers "Server: Classified";
    more_clear_headers 'X-Powered-By';
     
     client_max_body_size 0; 
     
     root /config/www/wordpress/;
     index index.html index.php;
      
    location ~ /\. {
    deny all;

    location / {
    try_files $uri $uri/ /index.php?_url=$uri&$query_string; 
    }

     
    # PHP
     location ~ \.php$ {
     fastcgi_split_path_info ^(.+\.php)(/.+)$;
     # With php7-cgi alone:
     fastcgi_pass 127.0.0.1:9000;
     # With php7-fpm:
     #fastcgi_pass unix:/var/run/php7-fpm.sock;
     fastcgi_index index.php;
     include /etc/nginx/fastcgi_params;
     }
     
     fastcgi_buffer_size 4K;
     fastcgi_buffers 64 4k; 
    }

    Get this question ones a a while and I am not that confident in NGINX proxy settings, I recommend using "NginxProxyManager", spare you a lot of headaches. If you still want to take the more manual route please ask the question in the "Letsencrypt" container support, but one thing I see is that you are redirecting to a https address when the redirection should be internally to ex.  http://192.168.1.100:8080

  19. 10 hours ago, sjoerd said:

    Wordpress doesnt "complain" about the old php version under ./wp-admin/site-health.php?

    My current site runs ubuntu 16 and php 7.0.33 to where the my virtualbox runs 18 and php7.4 (and i might even go for ubuntu 20 lts since i got released recently. Not sure if that comes with php7.4 or higher

     

    @Kru-x how do you keep WP up to date? everytime wp has a new version we get an updated docker ?

    Ill think you find it running much smoother in a container, instead having a full blown Operating system you use the minimal one in the container. The WP container is the the official container in the docker hub  https://hub.docker.com/_/wordpress, very smart guys maintaining it.

     

    My site is getting high scores when bench-marking the site even thought my unraid server is a 10 year old HP micro server with 8MB ram. Ok my site is not a high traffic site but I am really impressed of the performance and love the setup, can fire up a copy or a new site in minutes and toss them away when I am done with them.

     

    Sold? ;-)

    Kru-x

    • Thanks 1
  20. 11 hours ago, sjoerd said:

    Hi,

     

    Currently moving from my virtualbox vm (ubuntu 18lst, apache, php7, mariadb10xx, wordpress) to a kvm on unraid but I noticed a mariadb docker and new wordpress docker.

     

    I might go for the these two dockers. Just question.

    The WordPress docker. Does that contain the apache webserver as well - which version of php does is have. I php libs are missing how can we deal with that. Currently installing php as follows:

    
    $ sudo apt update
    $ sudo apt -y install software-properties-common
    $ sudo add-apt-repository ppa:ondrej/php
    $ sudo apt update
    $ sudo apt -y install php7.4
    $ sudo apt -y install php7.4-curl
    $ sudo apt -y install php7.4-mbstring
    $ sudo apt -y install php7.4-imagick
    $ sudo apt -y install php7.4-zip
    $ sudo apt -y install php7.4-gd
    $ sudo apt -y install php7.4-mysql

    If the two dockers give too much hassle I rather stick with a kvm (which is nearly done configuring)

     

    I just like the concept of using dockers tho but if it hinders me I'll skip and I don;t have the knowledge how to make my own dockers

     

     

    Hi Sjored,

     

    Using a docker is less hassle then you think, it's dead easy to use and really versatile, like eating a cake with out have to make it first :-), might take a little bit to get your head around how to make a docker container if needed but it is not that complicated. 

     

    This docker has

    PHP Version:              7.3.6
    MySQL Version:            5.5.5
    Web Server Info:          Apache/2.4.25 (Debian)

     

    As for the libs, WP has all the libraries that it needs and most of them as per your list above. If you for some reason need another one you have to ad them and to your own container.

    Not often I have needed though, but I have used some external libraries and have both made my own docker container and used some in my plugin.

     

    WP updates just like normal, under the update tab!

     

    Hope it helps,

    Kru-x

    • Thanks 1
  21. 13 minutes ago, lusitopp said:

     Thx, doing the 'next,next,finish' strategy worked.
    When the fields are there, like the user and password, i thought i should enter that 😃

    i have on another wierd issue now. I can't access 192.168.1.100:8080 from my pc (that is a vm on unraid). i can access that site from another vm on unraid, from my phone and laptop.🤔

     

     

     

    Glad it worked, the username and password if you are talking about in the template is there for if you change the DB continers username and password, as you have it now it is using "root" and full access to the DB, not the safest approach in DB's.

     

    Sorry I don't follow your setup, you can access it from one VM but not the other on the same server? Dunno,

  22. 2 hours ago, lusitopp said:

    Hi and thanks for your reply!

     

    I understand this, but i think i have enough traffic on eth0, there fore i want to use eth1 (br1) for several dockers.

    I did not understand that i couldn't just point to another dockers IP on the same br1 interface without advanced configuration. I would have to look into that or use a VM :D

     

    This is not happening. Im trying bridge mode for now, i have changed the port to 8081 since unraid uses 8080, i have also changed to "http://[IP]:[PORT:8081]/" in the advanced settings, but when i click the icon the page is opening on 8080. this must be a bug?

     

    So i installed MariaDB with default port, i did not change the password, im using bridged mode. port mapping is 172.17.0.2:3306 <-> 192.168.1.100:3306.
    I installed wordpress in bridged mode, database ip is set to 192.168.1.100:3306. for user and password i used 'wordpress'.
    Portmapping for wordpress is 172.17.0.3:80 <-> 192.168.1.100:8081

    When i browse to 192.168.1.100:8081 land at a page telling me: Error establishing a database connection

     

    If you want to use different IP addresses then that is over my head, only had to worried about it ones myself.

     

    But if you are trying to bridge them on the same IP then it should work,

     

    And sorry, I told you to use wordpress as user and password but forget that, just leave them blank and they defaults to root with blank password. Make sure password in the MariaDB is set to 0 eg blank password, its only if you have changed it and the username you have to add it to the WP container.

     

    The problem with "Error establishing a database connection" means that WP is actually talking to the DB but can't login (the above problem).  That it defaults to 8080 is probably a redirection from WordPress, have you ever managed to connect to the installation screen B4?

     

    Probably easiest to start from the begining again, delete both folders in your system and reinstall them again,


    The basic settings should be as easy as the attached photos.

     

     

    Hope it helps,

    MariaDB.png

     

    WP.png

  23. 11 hours ago, lusitopp said:

    Tried this docker tonight but dont know if im stupid, if there is something wrong in the container or my unraid.

    I setup MariaDB with the ip and port ...11:3309 (tried both host network and br1)
    During Wordpress docker installation i choose network br1 with the ip of ...12
    Also during the setup i have tried several different container ports, both 8080 and 443.
    The funny thing is, even if a choose 8080 or 443, the "webui" link on the docker image always open the site with :8080.
    The other funny thing is, even if i choose 8080 or 443, the port mapping is always 80.

     

    And then the other problem, when i open the site with port 80, i get this error: Error establishing a database connection

    So, how is this docker supposed to be installed?

    Hi lusitopp,

     

    There is a few issues and none of them is related to the container nor unraid, but we have all been there so don't be alarmed. ;-) 

     

    First, the IP address is the physical address to the computer (server) and should not be changed as you have done, most docker containers should be on the same address as your server and should be in "bridged" mode. Only in certain advanced situations a containers IP address  should be changed. To reach a container and if your servers IP address is as mine 192.168.1.100 you just add the :port number at the end for each container.

     

    So to reach the WordPress container you should ask for 192.168.1.100:8080 in your browser. All containers have to have different port numbers and that is when you change the 8080 if that is already in use of another container (or unraid), the unraid web interface is on port 80.

     

    If you have changed the port number unraid should pick that up when clicking on the Icon but that can also be changed in advanced settings WebUI: and by default it is "http://[IP]:[PORT:8080]/" to automatically be picked up.

     

    So install the MariaDB container with port 3306 (default port numbers for DB's in most cases) if not in use, then in the WordPress container where it says WORDPRESS_DB_HOST: add your "server IP":port eg 192.168.1.100:3306 and then WordPress can talk to the DB container. You also have to add DB_user and Password and if you have not changed it in the MariaDB container you can use "wordpress" as the user and the same for password.

     

    Then when clicking on the icon it should direct you to 192.168.1.100:8080 and WordPress can talk to the database in the background and you can continue installation and use it locally.

     

    PS. do not use 443 as the port, it is used as the SSL port (HTTPS) if you want to reach it from internet and should not be used internally. Remember the port is a internal pointer to a specific container/interface on your server (IP adress) all my containers is in the range of 8000 - 8099.

     

    Hope that answer your questions,

    Kru-x

     

     

×
×
  • Create New...