Want more timely Centmin Mod News Updates?
Become a Member

Letsencrypt Is it possible to install letsencrypt without creating a new vhost?

Discussion in 'Domains, DNS, Email & SSL Certificates' started by CarpCharacin, Nov 25, 2016.

  1. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    12:34 PM
    1.15.x
    MariaDB 10.1
    I cleared the cookies for my site, but now it is closing the connection.

     
  2. Tracy Perry

    Tracy Perry Active Member

    280
    118
    43
    Aug 24, 2014
    Texas
    Ratings:
    +210
    Local Time:
    1:34 PM
    1.21.6
    MariaDB 10.3.36
    Well, first thing you need to do is look at the vhost... it has only 1 IP allowed to access the admin.php and the /install directory. That needs to be changed the the IP's of whomever your "admins" are, with an IP entry for each. Until you do that, you can't access the admin.php.
    Security... Security trumps stupidity of re-using the same username/password. In fact, you and each admin needs to have their OWN entry in it.
    It's currently commented out (the IP blocks) so you are wide open.. but you ARE going to need to start learning to do this stuff yourself. I'm not going to provide "forever server admin" services for free. You were told that I'd set you up a BASIC VPS... and you are WELL above the level of a basic VPS setup now. You are wanting to get into areas that require some working knowledge and experience with Linux, but you are wanting to do it on a live site and not impact your site negatively - or get someone to do it for you for free.... THAT is why I still recommend you set up a test bed on your local computer to learn.
     
  3. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    12:34 PM
    1.15.x
    MariaDB 10.1
    The other admin is Angelphish. What is the location of the vhost where I can edit it? Any admin could sign in to the ACP without having to have their IP in there or use a username and password before. Can I disable it?
    Why does each of my admins need to have their own entry? What is it for? When I was following the guide, I just set up one with my ssh username and password.
     
  4. Tracy Perry

    Tracy Perry Active Member

    280
    118
    43
    Aug 24, 2014
    Texas
    Ratings:
    +210
    Local Time:
    1:34 PM
    1.21.6
    MariaDB 10.3.36
    That's what I told you.. .it's disabled now. And anyone can hit your admin.php and start guessing your password to get in - or temporarily lock you out.

    I'm not going to go and explain security 101 to you. This is a LOCK on the door to protect entry. Suffice to say, folks that know WAY more than you do are telling you that each admin needs their own user name and password and they don't need to be (and should NOT be) the same as you use anywhere else. To do otherwise is sheer stupidity and the reason that sites (like TAZ) get hacked so easily. Re-use of username/passwords or passwords that can be associated with a certain user. Do what you want, but I promise you, if your site gets hacked due to something like this, you will NOT get any assistance from me as you refused to help yourself and take basic security measures.
     
  5. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    12:34 PM
    1.15.x
    MariaDB 10.1
    What I am asking is what is that username and password I set used for? If I change it, I want it to be something that I can remember.
    If I want to re enable it, how do I?
     
  6. Tracy Perry

    Tracy Perry Active Member

    280
    118
    43
    Aug 24, 2014
    Texas
    Ratings:
    +210
    Local Time:
    1:34 PM
    1.21.6
    MariaDB 10.3.36
    it's for the access to allow you to log into the /install directory or admin.php - before you do authentication against XF. It's a second layer of username/password security.

    As I said, uncomment the lines (remove the # in front of them) and put your IP in place of the example on in there in the vhost definition for the ip blocking aspect. You will also need to create your htacess username/passwords and make sure that they are in the file that is pointed to in the vhost definition.
     
  7. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:34 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    never ever reuse login details anywhere !
    will let @Tracy Perry answer that as i am not sure what he configured for you
     
  8. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:34 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  9. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    12:34 PM
    1.15.x
    MariaDB 10.1
    But where is the file? Is it the file I created last night? Also, I can't access my webmail or phpmyadmin.
     
  10. Tracy Perry

    Tracy Perry Active Member

    280
    118
    43
    Aug 24, 2014
    Texas
    Ratings:
    +210
    Local Time:
    1:34 PM
    1.21.6
    MariaDB 10.3.36
    Once more (and the final time)... the password file is GIVEN to you (the path) in your vhost
    You simply have to look in it and it will tell you where it is/goes (odds are it doesn't exist since you haven't created the file). The path/name given in the vhost is only an example. You can call it anything you like and put it in just about any readable (by nginx) location you like and then edit the path/filename data in the above entry to reflect the one you use. It's normally suggested to use the path that is provided, but change the name up.

    As I explained to you on my others site.. .that's because the SSL vhost had no stanzas in it for that. It does now. The rest of the configuration will be yours to do. I've honestly given you several hundred dollars in "man hours" worth of labor (at my normal rate of charge), well above what I told you I would do.
    Your SSL non-WWW is remapping to WWW like you wanted, your phpmyadmin and webmail interfaces stanzas are in the vhost and IPv6 should be answering on both SSL and non-SSL ports.
    You will still need to do some configuration of RoundCube to reflect your new SSL setup.
     
  11. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:34 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    For protected directories for xenforo you can also read section on xenforo guide Nginx Rewrites for Xenforo Friendly Urls - CentminMod.com LEMP Nginx web stack for CentOS

    where user/pass contents file is at /usr/local/nginx/conf/htpasswd_admin_php for both locations
    Code (Text):
            location /admin.php {
                 auth_basic "Private";
                 auth_basic_user_file /usr/local/nginx/conf/htpasswd_admin_php;
                    include /usr/local/nginx/conf/php.conf;
                    allow 127.0.0.1;
                    allow YOURIPADDRESS;
                    deny all;
            }
    
            location /install/ {
                 auth_basic "Private";
                 auth_basic_user_file /usr/local/nginx/conf/htpasswd_admin_php;
                    include /usr/local/nginx/conf/php.conf;
                    allow 127.0.0.1;
                    allow YOURIPADDRESS;
                    deny all;
            }        

    Code (Text):
     /usr/local/nginx/conf/htpasswd.sh create /usr/local/nginx/conf/htpasswd_admin_php USERNAME PASSWORD

    now if you need additional usernames and passwords added use append instead of create

    add USERNAME2 and PASSWORD2
    Code (Text):
     /usr/local/nginx/conf/htpasswd.sh append /usr/local/nginx/conf/htpasswd_admin_php USERNAME2 PASSWORD2

    add USERNAME3 and PASSWORD3
    Code (Text):
     /usr/local/nginx/conf/htpasswd.sh append /usr/local/nginx/conf/htpasswd_admin_php USERNAME3 PASSWORD3
     
  12. CarpCharacin

    CarpCharacin Member

    267
    21
    18
    Oct 13, 2016
    Salt Lake City
    Ratings:
    +34
    Local Time:
    12:34 PM
    1.15.x
    MariaDB 10.1
    You misunderstood what I am asking @Tracy Perry. I am asking where you commented the IP address to disable it, not where I create the new file.
     
  13. Tracy Perry

    Tracy Perry Active Member

    280
    118
    43
    Aug 24, 2014
    Texas
    Ratings:
    +210
    Local Time:
    1:34 PM
    1.21.6
    MariaDB 10.3.36
    As I said earlier.. the IP address is checking is disabled in your vhost (which is located in the standard CentMin location of /usr/local/nginx/conf/conf.d... and I know it is as I can hit your admin page and your install directory
    Screen Shot 2016-11-25 at 4.38.39 PM.png Screen Shot 2016-11-25 at 4.38.28 PM.png


    ... just check the vhost and look for any lines preceded with a #
    That is a comment designator for the vhost. You will see something like # allow IP address here;
     
  14. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    4:34 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+