How to manage a vps

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • porn-update
    Confirmed User
    • Apr 2014
    • 422

    #1

    How to manage a vps

    As you can guess from the title, I'm thinking of taking an unmanaged VPS (eg. digitalocean), I have already tried in the past, with CentOS 6 and CWP (CentOS Web panel), I have not had very different results from a hosting, and then after a few months I closed it.

    Now many of your tips to my posts lead me to a VPS, so I'm thinking of trying it again.

    But I would like to start well, possibly avoiding as many errors as possible.

    I need some advice, for example:
    Use a software like cpanel or CWP (or other free) or do everything from command line? Or what else?
    Using Apache or Litespeed?
    Use tool like varnish reverse proxy?
    What to do absolutely?
    What to avoid absolutely?
    What is needed to not consume too much resources?
    etc, etc, etc...

    I think I can do it all by myself (with the right guides), but please help me to take at least the correct initial direction.
  • magneto664
    God Bless You
    • Aug 2014
    • 1470

    #2
    I can strong recommend serverpilot i use with vultr, digitalocean and linode - paid and free option - I never get any problems. for me is a best option to manage vps.
    magneto664 📧 gmail.com
    Cams.Zone 💘 Best CDN for Adult Content
    My Fav: 👍 Chaturbate 👍 Stripchat 👍 AdultFriendFinder

    Comment

    • tomash999
      Confirmed User
      • Sep 2015
      • 88

      #3
      If you didn't saw a difference, there are many things to consider before making assumptions, like how the software was written.

      If you have background processes, like a newsletter or video encoder, you should see a difference (even with your current setup though).

      1. Open to the public only what you have to. Use the command line as it will use less resources. A reason to use CPanel is if there are other managers, or it is more productive.
      2. Litespeed looks promising, but I never use it so I can't advise.
      3. Yes, for caching.

      Also read on these topics:
      1. Security, specifically on SSH access and firewall.
      2. Databases (access control, backups).
      3. Caching (HTTP caching if you are hosting the media and not using a CDN).
      4. Timezones

      Lnode and Digital Ocean have some good tutorials. There are YouTube videos as well:
      https://www.youtube.com/watch?v=oFduaKmAEbg

      Comment

      • Denny
        Too lazy to set a custom title
        • Feb 2005
        • 17390

        #4
        Not sure what you mean by "I have not had very different results from a hosting". What difference did you expect?

        Hosting your money sites on unmanaged server and trying to manage it "with the right guides" isn't a good idea.

        Looks like you need a fully managed solution or hire someone who knows what they are doing.

        Comment

        • 3xmedia
          Confirmed User
          • Apr 2004
          • 5738

          #5
          seems like you are CLUELESS and have no idea how to properly manage a server so why not get a fully managed VPS? It costs a bit more but you can sleep better... or are you really that BROKE and can't afford to pay a few bucks more for a fully managed plan?
          ---

          Comment

          • Denny
            Too lazy to set a custom title
            • Feb 2005
            • 17390

            #6
            Originally posted by magneto664
            I can strong recommend serverpilot i use with vultr, digitalocean and linode - paid and free option - I never get any problems. for me is a best option to manage vps.
            Looks good but it seems it's just some control panel. I guess you still need some knowledge about linux and server management?

            Comment

            • magneto664
              God Bless You
              • Aug 2014
              • 1470

              #7
              Originally posted by Denny
              Looks good but it seems it's just some control panel. I guess you still need some knowledge about linux and server management?
              Yes, some basic knowledge is necessary, After a long time using (2y) I never do any hard server management - all updates and security is a serverpilot job. I always use backups from vps hosting provider and work mostly on wordpress. Even a 10usd option per month give you amazing support. I don't even remember any issues.
              magneto664 📧 gmail.com
              Cams.Zone 💘 Best CDN for Adult Content
              My Fav: 👍 Chaturbate 👍 Stripchat 👍 AdultFriendFinder

              Comment

              • porn-update
                Confirmed User
                • Apr 2014
                • 422

                #8
                Wow thanks for the replies, I didn't expect so many. I try to answer everyone in one post.

                I gave a look at serverpilot, but I do not understand what it does... I can't find screenshots, guides, anything...
                Basically serverpilot installs in your place a server in digitalocean with serverpilot panel? It is not like Cpanel?
                Preferably wordpress, and to you remains only to monitor the server?
                In this case, I need more autonomy.

                My sites for work requiring substantially only php, mysql and cronjob.

                Not sure what you mean by "I have not had very different results from a hosting". What difference did you expect?
                I have only done a test, I took all the sites that I had in a hosting service, and I put them on digitalocean. Was hoping for a substantial performance and visits increase, but I did a test with a hosting that worked, was sufficient for the hosted sites, and then, not much has changed.

                This time is different, I want to move to digitalocean my vps

                why not get a fully managed VPS?
                For a lot of reasons, in all the vps that I have purchased from several vendors, I always had some problem, eg: database limitations, entry processes restrictions, cpu limitations, malfunctions, etc etc etc.

                Lately this problem "Mysql-open-file-limit-100000" http://gfy.com/webmaster-q-and-fucki...-100000-a.html.

                The last one I purchased on hawkhost every so often decides to do something that consumes all the cpu (normal operation of my sites consumes about 10% of the cpu) and restrict all of my sites and no one can explain why.

                This creates a lot of problems to google

                When for an period, my vps worked properly, my sites also arrived at the 20000, 30000, or 50000 visits a day, now 2000-3000, and when they start to increase something breaks...

                and I'm pretty sure that is not a problem of my sites consumption of resources because in the last few years I have changed 4-5 vps from different providers and it is always some different bullshit that creates problems.

                you still need some knowledge about linux and server management?
                I have some knowledge about linux and server management, use the linux desktop on all my pc's for years and I did some testing with digitalocean, I have not found big obstacles or problems.

                I can install apache, php and mysql etc, the one that I don't know is for example if it is worthwhile to install varnish or not from the point of view of the server.

                In the sense that it definitely brings benefits to the sites, but maybe, varnish use a lot of resources or consumes too much cpu...

                I really need this type of advice to set up a server
                .

                I am afraid of some problems or particular errors that the server may have (ex: "Mysql-open-file-limit 100000"), but also with the managed vps they have never come to a solution.

                I always open a ticket in support and:
                The first responses to the ticket are always: buy more resources and give me more money.
                The next are: will it be a problem of the code please contact your developer (me).
                Then usually respond with some bullshit to take time.
                Then comes an idiot who doesn't want to read all of the ticke and still responds to: buy new services, please contact the developer.
                And usually at this point I send them to hell.

                The assistance is only for simple things, for particular problems do not have the desire or ability to find a solution. Or at least, I never found one that was able to solve serious problems.
                The only real solution is always to change vps, and hope that in the new vps, everything is working.

                Often I even found myself the solution, but I have not been able to apply because I did not have the necessary access or permissions of the server, and also suggesting to support have done nothing.

                Of this, what do you think CentOS Web Panel | Free Linux Web Hosting Control Panel Always thinking from the server side.

                To me it looks not bad, I used it in my tests and in general I have not had any major problems.
                But maybe it consumes too many resources, or some gap? Es. suPHP, is it good or not? I don't know ...

                There is also a support, forum, tickets, etc., even if this tends to send often to the paid service. However, you can pay only when you need it.

                Sorry if I have dwelt. Thanks for the replies.

                Comment

                • Andreweb
                  Confirmed User
                  • Mar 2013
                  • 2431

                  #9
                  I use serverpilot and I am very happy with that ! Plus I have some basic linux knowledges!
                  Make Money With: Chaturbate
                  Cheap Reliable Hosting

                  Comment

                  • Barry-xlovecam
                    It's 42
                    • Jun 2010
                    • 18083

                    #10
                    Buy a $5 mo instance in the Cloud VPS
                    Make a subdomain named dev.yourdomain.tld
                    point the 'A' in your current server's dns for that subdomain to the new server IP.
                    set the new server's dns to that subdomain and its 'A' IP

                    I would install Ubuntu 16.04 LTS others will argue their favorite os CentOS is another commonly used.

                    open a SSH session and change to root user
                    get to work

                    Digitalocean and Linode have tutorials search out what you need to do.
                    unix.stackexchange.com is a good source.
                    Google is your friend -- use it.

                    when dev.yourdomain.tld seems to be working to your satisfaction --
                    from that location -- I am assuming /path/yourdomain.tld/dev;

                    cd to [......]/dev
                    $ cp -R * ../
                    copy recursively the site files up a level to the main (parent) domain's directory
                    create a new server configuration for the parent domain on the new server
                    change your DNS 'A' for the parent domain on the old server
                    add the parent domain to the DNS new VPS server with the new server's 'A'.

                    Migration of the HTTP part and the MySQL is now complete?

                    Or, pay for a managed VPS server and and do the things that you are good at now.

                    Using a control panel on a VPS or dedicated server is like using a leaky condom IMHO -- You can't feel a thing and it leaks all over the place

                    Comment

                    • bannel
                      So Fucking Banned
                      • Jan 2012
                      • 768

                      #11
                      See my sig. They provide full management at a cheap monthly price (transfer to the new location included).

                      Comment

                      • porn-update
                        Confirmed User
                        • Apr 2014
                        • 422

                        #12
                        So, these days I'm thinking about Digitalocean, maybe with panel, maybe not.

                        I would be interested in a panel especially to be able to monitor my sites.

                        Exist anything that allows you to do everything from command line but with statistics and graphs for monitoring?

                        Comment

                        • Barry-xlovecam
                          It's 42
                          • Jun 2010
                          • 18083

                          #13


                          open thumbnail link for larger image

                          DigitalOcean has a monitoring GUI you can set up.
                          There are probably web interfaces for LINUX console monitoring.

                          Comment

                          • magneto664
                            God Bless You
                            • Aug 2014
                            • 1470

                            #14
                            for vps monitoring I recommend https://nixstats.com
                            magneto664 📧 gmail.com
                            Cams.Zone 💘 Best CDN for Adult Content
                            My Fav: 👍 Chaturbate 👍 Stripchat 👍 AdultFriendFinder

                            Comment

                            • floresmedia
                              Confirmed User
                              • May 2017
                              • 133

                              #15
                              If you do not know how to manage a server then I would not recommend getting an unmanaged VPS.

                              If you want to learn how to manage a server then I would recommend installing a virtual machine and learning the ropes locally on your computer instead of learning on a live product.

                              Having an un managed VPS is a decent solution however it can be much cheaper and easier to scale an AWS EC2 Cloud Instance, which is very similar to having an un-managed vps but you have a lot more control and options.
                              Ditch traditional hosting an go cloud. I can help.

                              Contact: [email protected]

                              Comment

                              • Barry-xlovecam
                                It's 42
                                • Jun 2010
                                • 18083

                                #16
                                Better yet, install LINUX on an old computer and start learning.
                                I would recommend Ubuntu as there is a large Internet knowledge base to learn from -- Debian commands work too.

                                If you decide later to use another LINUX operating system on a host server adapting most of the commands will be easy.

                                You can open a terminal and practice -- SSH is just a remote terminal program.

                                Comment

                                • reddygs
                                  Registered User
                                  • Jul 2017
                                  • 31

                                  #17
                                  I prefer to handover VPS Management company.To answer your question light speed would be better option but before that you need to check with mail platform and plugins used in it .
                                  Regards
                                  Reddy .Medha Hosting | Managed Dedicated Servers

                                  Comment

                                  • porn-update
                                    Confirmed User
                                    • Apr 2014
                                    • 422

                                    #18
                                    Stupid question... better CentOS or Ubuntu server?

                                    Comment

                                    • tomash999
                                      Confirmed User
                                      • Sep 2015
                                      • 88

                                      #19
                                      Take Ubuntu, it will make everything easier for you (although CentOS isn't a bad choice)
                                      Last edited by tomash999; 07-23-2017, 06:23 PM. Reason: I wrote is instead of isn't

                                      Comment

                                      • porn-update
                                        Confirmed User
                                        • Apr 2014
                                        • 422

                                        #20
                                        But what is best for performance, speed, etc?

                                        If it is difficult, I learn, I have already used CentOS even without too many problems

                                        Comment

                                        • tomash999
                                          Confirmed User
                                          • Sep 2015
                                          • 88

                                          #21
                                          So stay with what you know, it doesn't matter for your use, and these are solid OS.

                                          What is your stack right now?

                                          Comment

                                          • Barry-xlovecam
                                            It's 42
                                            • Jun 2010
                                            • 18083

                                            #22
                                            I agree -- it's a matter of the devil you know best.

                                            Comment

                                            • porn-update
                                              Confirmed User
                                              • Apr 2014
                                              • 422

                                              #23
                                              Ok, I want to try ubuntu with sentora (ex zpanel), just to begin with, then in case we change

                                              Comment

                                              • porn-update
                                                Confirmed User
                                                • Apr 2014
                                                • 422

                                                #24
                                                Aaaaand now that I created the droplet and I would be ready to install I have doubts about the panels...

                                                I made a small list of what I use of cpanel and for what
                                                Actually, of cpanel the only buttons I use are:
                                                • phpMyAdmin-> to manage MySQL databases
                                                • MySQL databases-> To create DATABASE and users
                                                • Addon domains-> To add/remove sites
                                                • Cron jobs-> To create Conjobs (one per site)
                                                • File Manager-> (almost never) 99% FileZilla
                                                • Privacy Directory-> I think you can use Httpassword
                                                • FTP Account-> only one, with one I manage everything
                                                • Optimize website-> One time on the first day (set compress all)
                                                • Select PHP Version-> add remove PHP modules (es cache)
                                                • Switch to PHP option-> I think it's all on php.ini
                                                • CPU and concurrent connection usage-> monitoring (nixstats)
                                                • Let's encrypt-> add HTTPS to sites
                                                • MoD security-> Usually less touch better is...


                                                Everything else I've practically never even looked at.
                                                On this server I think to put only 4-5 sites, very simple, need only PHP, MySQL, and cronjob to work

                                                Then some caches, eg. Memcache, varnish, Opcache, acpu, etc.

                                                I could use this https://www.digitalocean.com/communi...n-ubuntu-16-04 to put the server online

                                                This https://nixstats.com to monitor it

                                                PHP I think I use the 5.6, the subsequent I have always caused problems or loss of visits (but maybe it's my problem)

                                                I need a quick way to turn on/off errors and set E_ALL &-E_NOTICE, but I think it's always php.ini
                                                (Don't go very well with my URL rewriters, they create endless log files and they waste a lot of resources, so I turn it on and off every time I have to make some changes)

                                                For varnish and other chache I hope there are guides around...

                                                Mails don't need it

                                                I miss HTTPS, some sites use it, I have used let's encrypt, but I think he needs a panel, I also saw Autossl, but I did not use it, I have no idea how it works, suggestions?

                                                Surely, it seems little but it is very much, there will be many small things to configure install and manage, but I have taken a look at some guides and overall it does not seem impossible

                                                At this point I think I still keep a bit the shared server and start moving just a couple of sites (the one with a few visits) in the new droplet Digitalocean and start to make everything work, then if everything works keep moving sites, otherwise I change the DNS and I return to the shared server... (Hopefully not)

                                                Tips? Recommendations? Things I forgot? Problems that I will surely meet? Errors that everyone does at the beginning, to avoid?

                                                Every help and advice is greatly appreciated... thanks

                                                Comment

                                                • Barry-xlovecam
                                                  It's 42
                                                  • Jun 2010
                                                  • 18083

                                                  #25
                                                  MySQL

                                                  Code:
                                                  barry@paragon-DS-7:~$ mysql -u[username] -p 
                                                  Enter password: 
                                                  Welcome to the MySQL monitor.  Commands end with ; or \g.
                                                  Your MySQL connection id is 13
                                                  Server version: 5.7.19-0ubuntu0.16.04.1 (Ubuntu)
                                                  
                                                  Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
                                                  
                                                  Oracle is a registered trademark of Oracle Corporation and/or its
                                                  affiliates. Other names may be trademarks of their respective
                                                  owners.
                                                  
                                                  Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
                                                  
                                                  mysql> 
                                                  
                                                  
                                                  sudo apt install mycli
                                                  barry@paragon-DS-7:~$ mycli -u[username]
                                                  Password: 
                                                  Version: 1.5.2
                                                  Chat: https://gitter.im/dbcli/mycli
                                                  Mail: https://groups.google.com/forum/#!forum/mycli-users
                                                  Home: http://mycli.net
                                                  Thanks to the contributor - Sudaraka Wijesinghe
                                                  mysql username@localhost:(none)> 
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                   [F2] Smart Completion: ON  [F3] Multiline: OFF  [F4] Emacs-mode
                                                  add a server user to the sudo < do a search on how to

                                                  Find your packages

                                                  sudo apt search 'what you need'

                                                  Code:
                                                  barry@paragon-DS-7:~$ sudo apt search php |grep -i 'php'
                                                  install the PHP you need

                                                  https://github.com/rosehosting/nginx...nginx_vhost.sh
                                                  Nginx HTTP server script

                                                  https://www.google.com/search?num=10...al+host+script
                                                  Google is your friend

                                                  Let's encrypt
                                                  https://certbot.eff.org/docs/
                                                  good luck

                                                  Comment

                                                  • floresmedia
                                                    Confirmed User
                                                    • May 2017
                                                    • 133

                                                    #26
                                                    Originally posted by porn-update
                                                    Stupid question... better CentOS or Ubuntu server?
                                                    Both are great operating systems.

                                                    I have used both CentOS is very similar to Red Hat Enterprise and Ubuntu is based off of Debian.

                                                    I enjoy working with Ubuntu a bit more than working with CentOS. In the end it comes down to personal preference. One of the main reasons I enjoy ubuntu better is because out of the box it comes with APT (Advanced Packaging Tool) library to perform installation and manage software. Where CentOS uses YUM.

                                                    Both APT and YUM are great and pretty much do the same thing, but this is where it comes down to preference.

                                                    I would rather type something like this to install mysql
                                                    Code:
                                                    sudo apt-get install mysql-server
                                                    Rather than typing this to install mysql
                                                    Code:
                                                    sudo yum install mysql-server
                                                    They look almost the same and do essentially the same thing but I prefer APT.

                                                    Its also worth noting that you can install APT on CentOS.

                                                    Ditch traditional hosting an go cloud. I can help.

                                                    Contact: [email protected]

                                                    Comment

                                                    • floresmedia
                                                      Confirmed User
                                                      • May 2017
                                                      • 133

                                                      #27
                                                      Originally posted by porn-update
                                                      Ok, I want to try ubuntu with sentora (ex zpanel), just to begin with, then in case we change
                                                      If you are going to be working on a LAMP stack within your server and need to configure I would recommend not using a cpanel type of software and just working off the terminal.

                                                      You can install Apache, PHP, and MYSQL using tasksel...
                                                      Code:
                                                      sudo apt-get install tasksel
                                                      Dont forget to make sure you give everything proper permissions.

                                                      To install phpmyadmin use
                                                      Code:
                                                      sudo apt-get install phpmyadmin
                                                      Also if you have the current version of Ubuntu running then when you install PHP you will get PHP7. However if you have an older version then by default it might install PHP5.x
                                                      Ditch traditional hosting an go cloud. I can help.

                                                      Contact: [email protected]

                                                      Comment

                                                      • porn-update
                                                        Confirmed User
                                                        • Apr 2014
                                                        • 422

                                                        #28
                                                        Thanks guys
                                                        I did the first step with Apache virtual host, now expect DNS propagation to see if everything works. (Hopefully well)

                                                        Thanks for the support

                                                        Comment

                                                        • porn-update
                                                          Confirmed User
                                                          • Apr 2014
                                                          • 422

                                                          #29
                                                          Shit, something's not working.

                                                          I did not do much... installed virtual host, created 2 files and changed the DNS
                                                          First this guide https://www.digitalocean.com/communi...n-ubuntu-16-04, an installation and a couple of files

                                                          Then this Https://www.digitalocean.com/communi...h-digitalocean



                                                          I changed the DNS on Namesilo and waited for it to propagate...
                                                          Domains alternativegirlshardpics.com and transgender-hardpics.com

                                                          It's been 24 hours and nothing seems to work.

                                                          The 2 sites seem crazy, I expect to see those 2 stupid files "Welcome to Test.com!" instead sometimes "impossible to reach the site", ther times I see the old site, sometimes I see it without CSS... I can not understand if it is my PC, my browser, my connection or if there is really some error...

                                                          How do you see my 2 sites?

                                                          Did I get something wrong?

                                                          Comment

                                                          • Barry-xlovecam
                                                            It's 42
                                                            • Jun 2010
                                                            • 18083

                                                            #30
                                                            is that the right IP?

                                                            Code:
                                                            barry@paragon-DS-7:~$ dig any transgender-hardpics.com
                                                            
                                                            ; <<>> DiG 9.10.3-P4-Ubuntu <<>> any transgender-hardpics.com
                                                            ;; global options: +cmd
                                                            ;; Got answer:
                                                            ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56212
                                                            ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 1
                                                            
                                                            ;; OPT PSEUDOSECTION:
                                                            ; EDNS: version: 0, flags:; udp: 512
                                                            ;; QUESTION SECTION:
                                                            ;transgender-hardpics.com.	IN	ANY
                                                            
                                                            ;; ANSWER SECTION:
                                                            transgender-hardpics.com. 1799	IN	NS	ns2.digitalocean.com.
                                                            transgender-hardpics.com. 1799	IN	NS	ns3.digitalocean.com.
                                                            transgender-hardpics.com. 1799	IN	SOA	ns1.digitalocean.com. hostmaster.transgender-hardpics.com. 1501023148 10800 3600 604800 1800
                                                            transgender-hardpics.com. 1799	IN	NS	ns1.digitalocean.com.
                                                            transgender-hardpics.com. 3599	IN	A	139.59.3.8
                                                            
                                                            ;; Query time: 92 msec
                                                            ;; SERVER: 127.0.0.1#53(127.0.0.1)
                                                            ;; WHEN: Thu Jul 27 03:38:01 EDT 2017
                                                            ;; MSG SIZE  rcvd: 183
                                                            
                                                            barry@paragon-DS-7:~$
                                                            Doesn't load in my browser.
                                                            if the IP is right the apache web server is misconfigured or if you have a firewall HTTP 80 and HTTPS 443 is not open

                                                            try server@root$ service ufw status
                                                            try server@root$ service apache2 status

                                                            Comment

                                                            • porn-update
                                                              Confirmed User
                                                              • Apr 2014
                                                              • 422

                                                              #31
                                                              Code:
                                                              root@ubuntu-2gb-blr1-01:~# service ufw status
                                                              ● ufw.service - Uncomplicated firewall
                                                                 Loaded: loaded (/lib/systemd/system/ufw.service; enabled; vendor preset: enabled)
                                                                 Active: active (exited) since Tue 2017-07-25 22:39:22 UTC; 2 days ago
                                                               Main PID: 606 (code=exited, status=0/SUCCESS)
                                                                  Tasks: 0
                                                                 Memory: 0B
                                                                    CPU: 0
                                                                 CGroup: /system.slice/ufw.service
                                                              
                                                              Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
                                                              
                                                              service apache2 status
                                                              ● apache2.service - LSB: Apache2 web server
                                                                 Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
                                                                Drop-In: /lib/systemd/system/apache2.service.d
                                                                         └─apache2-systemd.conf
                                                                 Active: active (running) since Thu 2017-07-27 17:55:53 UTC; 5h 30min ago
                                                                   Docs: man:systemd-sysv-generator(8)
                                                                Process: 22306 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
                                                                  Tasks: 55
                                                                 Memory: 6.3M
                                                                    CPU: 1min 40.510s
                                                                 CGroup: /system.slice/apache2.service
                                                                         ├─22323 /usr/sbin/apache2 -k start
                                                                         ├─22326 /usr/sbin/apache2 -k start
                                                                         └─22327 /usr/sbin/apache2 -k start
                                                              
                                                              Jul 27 17:55:51 ubuntu-2gb-blr1-01 systemd[1]: Starting LSB: Apache2 web server...
                                                              Jul 27 17:55:51 ubuntu-2gb-blr1-01 apache2[22306]:  * Starting Apache httpd web server apache2
                                                              Jul 27 17:55:52 ubuntu-2gb-blr1-01 apache2[22306]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
                                                              Jul 27 17:55:53 ubuntu-2gb-blr1-01 apache2[22306]:  *
                                                              Jul 27 17:55:53 ubuntu-2gb-blr1-01 systemd[1]: Started LSB: Apache2 web server.
                                                              Stupid guide

                                                              It makes you install a virtual host including the sample pages and does not let you open the firewall, as first step has a really demoral effect...
                                                              First or later you think maybe it's better if I stop doing the programmer and I'm going to sell ice cream in Germany

                                                              Looking for the errors reported by the commands that indicated me Barry-Xlovecam, I ended up on this https://www.digitalocean.com/communi...n-ubuntu-16-04 guide, which would be the next one I would have done, maybe it was better to do this first.

                                                              I have configured the firewall and now it works

                                                              Thank you very much for the help

                                                              Now LAMP.... surely I'll be back for the next issue, probably caused by a guide stupid

                                                              Comment

                                                              • porn-update
                                                                Confirmed User
                                                                • Apr 2014
                                                                • 422

                                                                #32
                                                                OK, I installed MySQL and PHP without too many problems

                                                                I have not seen things like: Which version of PHP I installed (I would like 5.6), PFM or mariadb, etc...

                                                                However, I came to the installation of the modules

                                                                In the current VPS I have these


                                                                The new server me from a list of installable
                                                                http://porn-update.com/temp/php_modules.txt

                                                                But something is missing, for example PDO... probably going to be installed separately

                                                                My sites need just, php, mysql-pdo, cronjob, and some cache, no mail.

                                                                But there are other modules that are extremely necessary to install that I don't know?

                                                                Comment

                                                                • Barry-xlovecam
                                                                  It's 42
                                                                  • Jun 2010
                                                                  • 18083

                                                                  #33
                                                                  open a ssh session
                                                                  Code:
                                                                  $ php -i|less
                                                                  or

                                                                  Code:
                                                                  $ php -i|more
                                                                  read what you really have

                                                                  the sudo apt search php| egrep -i 'PDO|curl'
                                                                  install the missing components to your php installation then restart the PHP service.

                                                                  I am using php 7.0 now you need to find these for your older version
                                                                  this is a good working start up install I found.

                                                                  Code:
                                                                  $ sudo apt-get -y install php7.0-mysql php7.0-curl php7.0-gd php7.0-intl php-pear php-imagick php7.0-imap php7.0-mcrypt php-memcache  php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-mbstring php-gettext

                                                                  Comment

                                                                  • porn-update
                                                                    Confirmed User
                                                                    • Apr 2014
                                                                    • 422

                                                                    #34
                                                                    Hi, in the list of this command php -i|less, PDO there, but does it mean it is already installed or that I can install it?

                                                                    Code:
                                                                    phpinfo()
                                                                    PHP Version => 7.0.18-0ubuntu0.16.04.1
                                                                    
                                                                    System => Linux ubuntu-2gb-blr1-01 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 x86_64
                                                                    Server API => Command Line Interface
                                                                    Virtual Directory Support => disabled
                                                                    Configuration File (php.ini) Path => /etc/php/7.0/cli
                                                                    Loaded Configuration File => /etc/php/7.0/cli/php.ini
                                                                    Scan this dir for additional .ini files => /etc/php/7.0/cli/conf.d
                                                                    Additional .ini files parsed => /etc/php/7.0/cli/conf.d/10-mysqlnd.ini,
                                                                    /etc/php/7.0/cli/conf.d/10-opcache.ini,
                                                                    /etc/php/7.0/cli/conf.d/10-pdo.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-calendar.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-ctype.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-exif.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-fileinfo.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-ftp.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-gettext.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-iconv.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-json.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-mcrypt.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-mysqli.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-phar.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-posix.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-readline.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-shmop.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-sockets.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-sysvmsg.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-sysvsem.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-sysvshm.ini,
                                                                    /etc/php/7.0/cli/conf.d/20-tokenizer.ini
                                                                    
                                                                    PHP API => 20151012
                                                                    PHP Extension => 20151012
                                                                    Zend Extension => 320151012
                                                                    Zend Extension Build => API320151012,NTS
                                                                    PHP Extension Build => API20151012,NTS
                                                                    Debug Build => no
                                                                    Thread Safety => disabled
                                                                    Zend Signal Handling => disabled
                                                                    Zend Memory Manager => enabled
                                                                    Zend Multibyte Support => disabled
                                                                    IPv6 Support => enabled
                                                                    DTrace Support => available, disabled
                                                                    
                                                                    Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar
                                                                    Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2
                                                                    Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, convert.iconv.*, mcrypt.*, mdecrypt.*
                                                                    
                                                                    This program makes use of the Zend Scripting Language Engine:
                                                                    Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
                                                                        with Zend OPcache v7.0.18-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
                                                                    
                                                                    
                                                                     _______________________________________________________________________
                                                                    
                                                                    
                                                                    Configuration
                                                                    :
                                                                    PHP seems to be the 7. I would like 5.6, some time ago I updated all my sites to PHP7, then I tried to set PHP 7 in the VPS and I left them a couple of months, my sites at that time have lost almost 80% of the visits... restoring php 5.6 slowly have returned to normal mode.

                                                                    I have absolutely no idea why this thing happened...

                                                                    Can a downgrade of PHP create problems? Even if the server is new/empty

                                                                    Code:
                                                                    sudo apt search php| egrep -i 'PDO|curl' 
                                                                    
                                                                    WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
                                                                    
                                                                    php-curl/xenial 1:7.0+35ubuntu6 all
                                                                      CURL module for PHP [default]
                                                                    php-phpdocumentor-reflection/xenial 1.0.7-1build1 all
                                                                    php-phpdocumentor-reflection-common/xenial 1.0-2build1 all
                                                                      Common reflection classes - phpDocumentor component
                                                                    php-phpdocumentor-reflection-docblock/xenial 2.0.4-1build1 all
                                                                      DocBlock parser - phpDocumentor component
                                                                    php-phpdocumentor-type-resolver/xenial 0.1.6-2 all
                                                                      TypeResolver and FqsenResolver - phpDocumentor component
                                                                    php7.0-curl/xenial-updates 7.0.18-0ubuntu0.16.04.1 amd64
                                                                      CURL module for PHP
                                                                    phpdox/xenial 0.8.1.1-1ubuntu1 all
                                                                    python-sphinxcontrib.phpdomain/xenial 0.1.4-2 all
                                                                      Sphinx "phpdomain" extension

                                                                    Comment

                                                                    • King Mark
                                                                      So Fucking Banned
                                                                      • Aug 2016
                                                                      • 27033

                                                                      #35
                                                                      Originally posted by magneto664
                                                                      I can strong recommend serverpilot i use with vultr, digitalocean and linode - paid and free option - I never get any problems. for me is a best option to manage vps.
                                                                      I was about to fuck with that, till I realized it only works on Ubuntu servers. Fuck all that, centos over here.

                                                                      Comment

                                                                      • VRR
                                                                        Confirmed User
                                                                        • Jul 2017
                                                                        • 37

                                                                        #36
                                                                        Originally posted by porn-update

                                                                        Can a downgrade of PHP create problems? Even if the server is new/empty
                                                                        In theory on a fresh server you should be fine with downgrading.
                                                                        In practice there may be parts of your site that don't work well with one of the two versions, depending on for what version they were written. The differences between PHP5 and PHP7 may be the reason why you've experienced drop in traffic earlier. Something probably didn't work as it's supposed to but it went unnoticed. If you can confirm that your code works on both versions PHP7 is faster so I'd stick with it.
                                                                        PUSHR CDN - High-performance content delivery network for fast growing projects
                                                                        Skype: Victor_NetStack

                                                                        Comment

                                                                        • Barry-xlovecam
                                                                          It's 42
                                                                          • Jun 2010
                                                                          • 18083

                                                                          #37
                                                                          Code:
                                                                          $ sudo apt-get -y install php7.0-mysql php7.0-curl php7.0-gd php7.0-intl php-pear php-imagick php7.0-imap php7.0-mcrypt php-memcache  php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-mbstring php-gettext
                                                                          I ran this command for PHP 7 and it fixed the PDO drivers, I got the error reported back 'no driver found' -- that was my issue -- actually I found this code snippet when searching PDO fixes specifically -- it came from a supplementary command on a Digital Ocean tutorial.

                                                                          php7.0-mysql was the fix, the rest looked useful to me so I installed them: gd, pear, imagemagic and sqlite3. I have needed to use these in the past and they were not installed. My HTTP server is Nginx and PHP will work out of the box with a tweak to the gateway

                                                                          For reference: Fix Nginx PHP gateway -- if anyone else is struggling with this ...

                                                                          Code:
                                                                            location ~ \.php {
                                                                              fastcgi_index index.php;
                                                                              fastcgi_split_path_info ^(.+\.php)(.*)$;
                                                                              include /etc/nginx/fastcgi_params;
                                                                              fastcgi_pass 127.0.0.1:[port number];
                                                                              fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
                                                                            }
                                                                          Code:
                                                                          root@localhost:/etc/php/7.0/fpm/pool.d# egrep 'listen' www.conf
                                                                          ; - 'listen' (unixsocket)
                                                                          ;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
                                                                          ;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
                                                                          ;   'port'                 - to listen on a TCP socket to all addresses
                                                                          ;   '/path/to/unix/socket' - to listen on a unix socket.
                                                                          change>>>>listen = /run/php/php7.0-fpm.sock
                                                                          to>>> listen = 127.0.0.1:[same port number used in your Nginx configuration files]
                                                                          ^^^^^
                                                                          
                                                                          ; Set listen(2) backlog.
                                                                          ;listen.backlog = 511
                                                                          
                                                                          
                                                                          service php7.0-fpm restart

                                                                          Comment

                                                                          • porn-update
                                                                            Confirmed User
                                                                            • Apr 2014
                                                                            • 422

                                                                            #38
                                                                            My sites works with 7, the code structure of my sites is very simple, I have basically just updated all queries from mysql to pdo

                                                                            Comment

                                                                            • porn-update
                                                                              Confirmed User
                                                                              • Apr 2014
                                                                              • 422

                                                                              #39
                                                                              So I did a few things... I did the PHP downgrade with this:

                                                                              Code:
                                                                              From php5.6 to php7.0:
                                                                              Apache:
                                                                              sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart
                                                                              CLI:
                                                                              sudo update-alternatives --set php /usr/bin/php7.0
                                                                              From php7.0 to php5.6:
                                                                              Apache:
                                                                              sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart
                                                                              CLI:
                                                                              sudo update-alternatives --set php /usr/bin/php5.6
                                                                              I have also installed phpMyAdmin, installed let's encrypt (and added a certificate for alternativegirlshardpics.com) figured out how to load via SFTP.

                                                                              But it does not work almost anything...

                                                                              PHP does not seem to work, I put 2 files in the root, index.php and Info.php (phpinfo), return 2 pages blank... looking at the source code you see the PHP code...

                                                                              By visiting https:alternativegirlshardpics.com, it says invalid certificate

                                                                              Shit, it happened some mess... you think I can fix it?
                                                                              Even when I install modules I'm not sure about installing them on PHP 5.6 or 7

                                                                              I almost thought about making a new droplet and install directly only PHP 5.6

                                                                              Then I noticed that the folder structure is
                                                                              domain1.com/public_html
                                                                              Domain2.com/public_html

                                                                              I would like to
                                                                              public_html/domain1. com
                                                                              public_html/domain2. com

                                                                              Just change the addresses of the files on VirtualHost?

                                                                              Comment

                                                                              • Barry-xlovecam
                                                                                It's 42
                                                                                • Jun 2010
                                                                                • 18083

                                                                                #40
                                                                                If the PHP 7 was working why mess with it?
                                                                                It was working in HTTP or in cli only (terminal)

                                                                                As far as your paths;

                                                                                You need to add 80,443
                                                                                and what is needed for TLS (SSL HTTPS)
                                                                                Code:
                                                                                <VirtualHost *>
                                                                                        ServerAdmin [email protected]
                                                                                        ServerName  example.com
                                                                                        ServerAlias www.example.com
                                                                                
                                                                                     [COLOR="Yellow"]   # Indexes + Directory Root.
                                                                                        DirectoryIndex index.html index.shtml index.php index.cgi index.xhtml
                                                                                        DocumentRoot /home/[your path]/public_html
                                                                                [/COLOR]
                                                                                        # CGI Directory
                                                                                        ScriptAlias /cgi-bin/ /home/[your path]/public_html
                                                                                        <Location /cgi-bin>
                                                                                                Options +ExecCGI
                                                                                
                                                                                	AddHandler server-parsed .shtml .xhtml
                                                                                
                                                                                        </Location>
                                                                                		#rewrites
                                                                                		RewriteEngine on
                                                                                		
                                                                                
                                                                                        # Logfiles
                                                                                        ErrorLog  /home/[your path]/logs/error.log
                                                                                        CustomLog /home/[your path]/logs/access.log combined
                                                                                
                                                                                	<IfModule security2_module>
                                                                                	    SecRuleEngine Off
                                                                                	</IfModule>
                                                                                	<Directory /home/[your path]/public_html>
                                                                                	   Order allow,deny
                                                                                	   Allow from all
                                                                                	   # New directive needed in Apache 2.4.3: 
                                                                                	   Require all granted
                                                                                	</Directory>
                                                                                #IMPORTANT TO ADD^^^!
                                                                                </VirtualHost>
                                                                                
                                                                                #a2ensite example.com
                                                                                #/etc/init.d/apache2 restart

                                                                                Comment

                                                                                • porn-update
                                                                                  Confirmed User
                                                                                  • Apr 2014
                                                                                  • 422

                                                                                  #41
                                                                                  But where?

                                                                                  I have this: sudo nano /etc/apache2/sites-available/alternativegirlshardpics.com.conf
                                                                                  and this: sudo nano /etc/apache2/mods-enabled/dir.conf

                                                                                  Comment

                                                                                  • porn-update
                                                                                    Confirmed User
                                                                                    • Apr 2014
                                                                                    • 422

                                                                                    #42
                                                                                    And then suddenly a lighting...

                                                                                    is there anything in the PHP configuration that does not work <? But it requires this <?php, probably not active

                                                                                    Comment

                                                                                    • Barry-xlovecam
                                                                                      It's 42
                                                                                      • Jun 2010
                                                                                      • 18083

                                                                                      #43
                                                                                      Originally posted by porn-update
                                                                                      But where?

                                                                                      I have this: sudo nano /etc/apache2/sites-available/alternativegirlshardpics.com.conf
                                                                                      and this: sudo nano /etc/apache2/mods-enabled/dir.conf
                                                                                      /etc/apache2/sites-available/alternativegirlshardpics.com.conf
                                                                                      $cd /etc/apache2/sites-available
                                                                                      $ls -1
                                                                                      [see what is there]
                                                                                      $cp alternativegirlshardpics.com.conf alternativegirlshardpics.com.conf~
                                                                                      [back up your file that works]
                                                                                      nano /etc/apache2/sites-available/alternativegirlshardpics.com.conf
                                                                                      [make your edits] ^X 'y'

                                                                                      $a2ensite alternativegirlshardpics.com.conf
                                                                                      $ /etc/init.d/apache2 restart
                                                                                      or;
                                                                                      service apache2 restart

                                                                                      php is always starts 5 and 7 (4 was <? as I recall)
                                                                                      <?php '{......}'
                                                                                      ?>

                                                                                      in php 7 you actually don't need the closing tag -- try it LOL works ...

                                                                                      check your return on this
                                                                                      Code:
                                                                                      barry@paragon-DS-7:~$ apt search apache2|grep 'php'
                                                                                      
                                                                                      WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
                                                                                      
                                                                                      libapache2-mod-php/xenial,xenial 1:7.0+35ubuntu6 all
                                                                                      libapache2-mod-php7.0/xenial-updates 7.0.18-0ubuntu0.16.04.1 amd64
                                                                                      php7.0-fpm/xenial-updates,now 7.0.18-0ubuntu0.16.04.1 amd64 [installed,automatic]
                                                                                      barry@paragon-DS-7:~$

                                                                                      Comment

                                                                                      • porn-update
                                                                                        Confirmed User
                                                                                        • Apr 2014
                                                                                        • 422

                                                                                        #44
                                                                                        Thank you

                                                                                        Almost online, in the end I thought I'd install an 14.04 with PHP5 native, then later with calm install a 16.04 with PHP 7. And I will manage the whole changing DNS

                                                                                        There are almost, the databases are online, the files are online, only one last thing is missing, the symlink.

                                                                                        My sites to work need to symlink to a folder that contains functions shared by all.

                                                                                        Usually on VPS with cpanel I created the symlink by creating a file with this code and loading it into public_html.

                                                                                        Code:
                                                                                        symlink('/home/pornupda/public_html/function_global', '/home/pornupda/public_html/transgender-hardpics.com/function_global');
                                                                                        Now the situation is strange...

                                                                                        I have these
                                                                                        /var/www/html/
                                                                                        /var/www/public_html/

                                                                                        In /html responds the server IP, in public_html my sites (following the tutorial has happened this)

                                                                                        In public_html:
                                                                                        Alternativegirlshardpics.com
                                                                                        Function_global
                                                                                        Transgender-hardpics.com

                                                                                        I tried to create the symlink with this code
                                                                                        Code:
                                                                                        symlink('/var/www/public_html/function_global', '/var/www/public_html/alternativegirlshardpics.com/function_global');
                                                                                        I uploaded the file in /html (I also tried /public_html/alternativegirlshardpics.com)

                                                                                        But he says
                                                                                        Code:
                                                                                        Warning: symlink (): Permission denied in/var/www/html/add_symlink_digitalocean.php on line 3
                                                                                        How do I create this symlink? What have I missed?

                                                                                        Can I change /html in /public_html? is a mess happening? Better rather if I move my sites from /public_html to /html? Just to put a little in order...

                                                                                        Comment

                                                                                        • porn-update
                                                                                          Confirmed User
                                                                                          • Apr 2014
                                                                                          • 422

                                                                                          #45
                                                                                          Found

                                                                                          From terminal

                                                                                          Code:
                                                                                          ln -s path/to/source path/destination/symlink

                                                                                          Comment

                                                                                          • Barry-xlovecam
                                                                                            It's 42
                                                                                            • Jun 2010
                                                                                            • 18083

                                                                                            #46
                                                                                            I make my document root for the server permissions

                                                                                            username:www-data
                                                                                            user:group

                                                                                            the command is from the level above the directory whose permissions you want to change

                                                                                            Code:
                                                                                            $ stat 'the directory name'
                                                                                            #return the ownership info, *check any sub-directories and files too.
                                                                                            
                                                                                            $ stat *
                                                                                            #everything below the target
                                                                                            #then if necessary
                                                                                            $ chown -R username:www-data
                                                                                            #recursively change ownership permissions
                                                                                            #you need root or sudo
                                                                                            you need these permissions for the server and php to function correctly
                                                                                            also to FTP into the ..../html owner 0 root if html/mydocroot is username:www-data and there is a symbolic link ...

                                                                                            I use scp at the command line or sftp in a FTP client -- then you need no FTP server, its all over ssh -- more secure and less resources used.

                                                                                            the symbolic link may not work due to a permissions conflict?

                                                                                            **
                                                                                            ln -s yeah ....

                                                                                            Comment

                                                                                            • porn-update
                                                                                              Confirmed User
                                                                                              • Apr 2014
                                                                                              • 422

                                                                                              #47
                                                                                              Sites Online!

                                                                                              But nothing works...

                                                                                              Only the HTTPS version works
                                                                                              https://www.alternativegirlshardpics.com/

                                                                                              Without HTTPS
                                                                                              Code:
                                                                                              Internal server Error
                                                                                              Apache/2.4.7 (Ubuntu) server at www.alternativegirlshardpics.com Port 80
                                                                                              And you do not see the images, the images have this structure
                                                                                              Code:
                                                                                              < img src = "https://www.alternativegirlshardpics.com/images/blank.gif" data-src = "https://images03-fame.gammacdn.com/movies/64703/64703_01/previews/2/174/top_1_185x135/64703_01_01.jpg"
                                                                                              And only the home page, this page does not work
                                                                                              https://www.alternativegirlshardpics.com/1004

                                                                                              It seems a problem URL rewriter, but on port 443 ??? Seems like an SSL problem.

                                                                                              In both sites I have added a certificate let's encrypt, following this guide https://www.digitalocean.com/communi...n-ubuntu-14-04


                                                                                              What's missing???

                                                                                              I'll attach the various virtual host files because I'm not understanding anything anymore

                                                                                              /etc/apache2/sites-enabled/000-default.conf
                                                                                              Code:
                                                                                              <VirtualHost *:80>
                                                                                                      # The ServerName directive sets the request scheme, hostname and port that
                                                                                                      # the server uses to identify itself. This is used when creating
                                                                                                      # redirection URLs. In the context of virtual hosts, the ServerName
                                                                                                      # specifies what hostname must appear in the request's Host: header to
                                                                                                      # match this virtual host. For the default virtual host (this file) this
                                                                                                      # value is not decisive as it is used as a last resort host regardless.
                                                                                                      # However, you must set it for any further virtual host explicitly.
                                                                                                      #ServerName www.example.com
                                                                                              
                                                                                                      ServerAdmin [email protected]
                                                                                                      DocumentRoot /var/www/public_html
                                                                                              
                                                                                                      <Directory /var/www/public_html>
                                                                                                              Options Indexes FollowSymLinks MultiViews
                                                                                                              AllowOverride All
                                                                                                              Order allow,deny
                                                                                                              allow from all
                                                                                                              # New directive needed in Apache 2.4.3:
                                                                                                              Require all granted
                                                                                                      </Directory>
                                                                                              
                                                                                                      # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
                                                                                                      # error, crit, alert, emerg.
                                                                                                      # It is also possible to configure the loglevel for particular
                                                                                                      # modules, e.g.
                                                                                                      #LogLevel info ssl:warn
                                                                                              
                                                                                                      ErrorLog ${APACHE_LOG_DIR}/error.log
                                                                                                      CustomLog ${APACHE_LOG_DIR}/access.log combined
                                                                                              
                                                                                                      # For most configuration files from conf-available/, which are
                                                                                                      # enabled or disabled at a global level, it is possible to
                                                                                                      # include a line for only one particular virtual host. For example the
                                                                                                      # following line enables the CGI configuration for this host only
                                                                                                      # after it has been globally disabled with "a2disconf".
                                                                                                      #Include conf-available/serve-cgi-bin.conf
                                                                                              </VirtualHost>
                                                                                              /etc/apache2/sites-available/alternativegirlshardpics.com.conf
                                                                                              Code:
                                                                                              <VirtualHost *:80>
                                                                                                      # The ServerName directive sets the request scheme, hostname and port that
                                                                                                      # the server uses to identify itself. This is used when creating
                                                                                                      # redirection URLs. In the context of virtual hosts, the ServerName
                                                                                                      # specifies what hostname must appear in the request's Host: header to
                                                                                                      # match this virtual host. For the default virtual host (this file) this
                                                                                                      # value is not decisive as it is used as a last resort host regardless.
                                                                                                      # However, you must set it for any further virtual host explicitly.
                                                                                                      #ServerName www.example.com
                                                                                              
                                                                                                      ServerAdmin [email protected]
                                                                                                      ServerName alternativegirlshardpics.com
                                                                                                      ServerAlias www.alternativegirlshardpics.com
                                                                                                      DocumentRoot /var/www/public_html/alternativegirlshardpics.com
                                                                                              
                                                                                              
                                                                                                      # CGI Directory
                                                                                                      ScriptAlias /cgi-bin/ /var/www/public_html/alternativegirlshardpics.com
                                                                                                      <Location /cgi-bin>
                                                                                                              Options +ExecCGI
                                                                                              
                                                                                                      AddHandler server-parsed .shtml .xhtml
                                                                                              
                                                                                                      </Location>
                                                                                                              #rewrites
                                                                                                              RewriteEngine on
                                                                                              
                                                                                                      <IfModule security2_module>
                                                                                                          SecRuleEngine Off
                                                                                                      </IfModule>
                                                                                              
                                                                                                      <Directory /var/www/public_html/alternativegirlshardpics.com>
                                                                                                              Options Indexes FollowSymLinks MultiViews
                                                                                                              AllowOverride All
                                                                                                              Order allow,deny
                                                                                                              allow from all
                                                                                                              # New directive needed in Apache 2.4.3:
                                                                                                              Require all granted
                                                                                                      </Directory>
                                                                                              
                                                                                                      # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
                                                                                                      # error, crit, alert, emerg.
                                                                                                      # It is also possible to configure the loglevel for particular
                                                                                                      # modules, e.g.
                                                                                                      #LogLevel info ssl:warn
                                                                                              
                                                                                                      ErrorLog ${APACHE_LOG_DIR}/error.log
                                                                                                      CustomLog ${APACHE_LOG_DIR}/access.log combined
                                                                                              I found also this:
                                                                                              /etc/apache2/sites-available/alternativegirlshardpics.com-le-ssl.conf
                                                                                              Code:
                                                                                              <IfModule mod_ssl.c>
                                                                                              <VirtualHost *:443>
                                                                                                      # The ServerName directive sets the request scheme, hostname and port that
                                                                                                      # the server uses to identify itself. This is used when creating
                                                                                                      # redirection URLs. In the context of virtual hosts, the ServerName
                                                                                                      # specifies what hostname must appear in the request's Host: header to
                                                                                                      # match this virtual host. For the default virtual host (this file) this
                                                                                                      # value is not decisive as it is used as a last resort host regardless.
                                                                                                      # However, you must set it for any further virtual host explicitly.
                                                                                                      #ServerName www.example.com
                                                                                              
                                                                                                      ServerAdmin [email protected]
                                                                                                      ServerName alternativegirlshardpics.com
                                                                                                      ServerAlias www.alternativegirlshardpics.com
                                                                                                      DocumentRoot /var/www/public_html/alternativegirlshardpics.com
                                                                                              
                                                                                                      # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
                                                                                                      # error, crit, alert, emerg.
                                                                                                      # It is also possible to configure the loglevel for particular
                                                                                                      # modules, e.g.
                                                                                                      #LogLevel info ssl:warn
                                                                                              
                                                                                                      ErrorLog ${APACHE_LOG_DIR}/error.log
                                                                                                      CustomLog ${APACHE_LOG_DIR}/access.log combined
                                                                                              
                                                                                                      # For most configuration files from conf-available/, which are
                                                                                                      # enabled or disabled at a global level, it is possible to
                                                                                                      # include a line for only one particular virtual host. For example the
                                                                                                      # following line enables the CGI configuration for this host only
                                                                                                      # after it has been globally disabled with "a2disconf".
                                                                                                      #Include conf-available/serve-cgi-bin.conf
                                                                                              SSLCertificateFile /etc/letsencrypt/live/alternativegirlshardpics.com/cert.pem
                                                                                              SSLCertificateKeyFile /etc/letsencrypt/live/alternativegirlshardpics.com/privkey.pem
                                                                                              Include /etc/letsencrypt/options-ssl-apache.conf
                                                                                              SSLCertificateChainFile /etc/letsencrypt/live/alternativegirlshardpics.com/chain.pem
                                                                                              </VirtualHost>
                                                                                              </IfModule>
                                                                                              <IfModule mod_ssl.c>
                                                                                              <VirtualHost *:443>
                                                                                                      # The ServerName directive sets the request scheme, hostname and port that
                                                                                                      # the server uses to identify itself. This is used when creating
                                                                                                      # redirection URLs. In the context of virtual hosts, the ServerName
                                                                                                      # specifies what hostname must appear in the request's Host: header to
                                                                                                      # match this virtual host. For the default virtual host (this file) this
                                                                                                      # value is not decisive as it is used as a last resort host regardless.
                                                                                                      # However, you must set it for any further virtual host explicitly.
                                                                                                      #ServerName www.example.com
                                                                                              
                                                                                                      ServerAdmin [email protected]
                                                                                                      ServerName alternativegirlshardpics.com
                                                                                                      ServerAlias www.alternativegirlshardpics.com
                                                                                                      DocumentRoot /var/www/public_html/alternativegirlshardpics.com
                                                                                              
                                                                                                      # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
                                                                                                      # error, crit, alert, emerg.
                                                                                                      # It is also possible to configure the loglevel for particular
                                                                                                      # modules, e.g.
                                                                                                      #LogLevel info ssl:warn
                                                                                              
                                                                                                      ErrorLog ${APACHE_LOG_DIR}/error.log
                                                                                                      CustomLog ${APACHE_LOG_DIR}/access.log combined
                                                                                              
                                                                                                      # For most configuration files from conf-available/, which are
                                                                                                      # enabled or disabled at a global level, it is possible to
                                                                                                      # include a line for only one particular virtual host. For example the
                                                                                                      # following line enables the CGI configuration for this host only
                                                                                                      # after it has been globally disabled with "a2disconf".
                                                                                                      #Include conf-available/serve-cgi-bin.conf
                                                                                              SSLCertificateFile /etc/letsencrypt/live/alternativegirlshardpics.com/cert.pem
                                                                                              SSLCertificateKeyFile /etc/letsencrypt/live/alternativegirlshardpics.com/privkey.pem
                                                                                              Include /etc/letsencrypt/options-ssl-apache.conf
                                                                                              SSLCertificateChainFile /etc/letsencrypt/live/alternativegirlshardpics.com/chain.pem
                                                                                              </VirtualHost>
                                                                                              </IfModule>
                                                                                              last error log
                                                                                              Code:
                                                                                              [Wed Aug 02 21:11:14.880693 2017] [ssl:warn] [pid 1306] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
                                                                                              [Wed Aug 02 21:11:15.275079 2017] [ssl:warn] [pid 1307] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
                                                                                              [Wed Aug 02 21:11:15.284878 2017] [mpm_prefork:notice] [pid 1307] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.21 OpenSSL/1.0.1f configured -- resuming normal operations
                                                                                              [Wed Aug 02 21:11:15.284941 2017] [core:notice] [pid 1307] AH00094: Command line: '/usr/sbin/apache2'
                                                                                              [Wed Aug 02 21:12:44.308475 2017] [core:alert] [pid 1318] [client 66.249.66.205:38269] /var/www/public_html/transgender-hardpics.com/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

                                                                                              Comment

                                                                                              • porn-update
                                                                                                Confirmed User
                                                                                                • Apr 2014
                                                                                                • 422

                                                                                                #48
                                                                                                Meanwhile I created another droplet and started it all over again, and it worked...

                                                                                                The 2 sites are online, it works url_rewriter and I solved the problem of the photos (my fault, uploaded an old file without a JavaScript)

                                                                                                The only thing I haven't reinstalled is let's encrypt, so my sites now only work in http

                                                                                                So I think it's been let's encrypt to make the mess...

                                                                                                I would not repeat everything, so I'm thinking about another way to make HTTPS, suggestions?


                                                                                                P.S. How do I know if Opcache, memcached and APCU, etc. are working?


                                                                                                Last stupid question: varnish does not work in HTTPS? Should I use Nginx for HTTPS?

                                                                                                Comment

                                                                                                • porn-update
                                                                                                  Confirmed User
                                                                                                  • Apr 2014
                                                                                                  • 422

                                                                                                  #49
                                                                                                  Sites Online!

                                                                                                  I destroyed and created a hundred droplet in the meantime, but we finally got to have the 2 sites online with working HTTPS
                                                                                                  https://www.alternativegirlshardpics.com/
                                                                                                  https://www.transgender-hardpics.com/

                                                                                                  I tried to install varnish with Apache and Nginx, but it was like throwing a firecracker inside the server case, nothing worked anymore and there was no way to understand why...
                                                                                                  The guides seem kinda old, maybe varnish is dead with https... ???

                                                                                                  Anyway we are online, now optimization... cache, gzip compression, monitoring etc etc etc, tips?

                                                                                                  Comment

                                                                                                  • Barry-xlovecam
                                                                                                    It's 42
                                                                                                    • Jun 2010
                                                                                                    • 18083

                                                                                                    #50
                                                                                                    You are hotlinking to images that are not using TLS(HTPS)
                                                                                                    So, your SSL is broken -- not your fault -- but is broken HTTPS better than no HTTPS?

                                                                                                    Comment

                                                                                                    Working...