Hot answers tagged

11

The answer to your titled question "Do I need to have port 80 configured in LAMP for an HTTPS website?" is no, you don't. You can run a LAMP stack on whatever port you would like. Common choices include 80,443 (SSL/TLS), 8080, 8000, etc. Inside the question, you add a wrinkle which changes the answer a bit. "Note that I want HTTP to be redirected to HTTPS."...


8

php.ini-development file for php7 on ubuntu 16.04 is located in /usr/lib/php/7.0/php.ini-development So you can do the following: make backup copy of your current php.ini: $ sudo mv /etc/php/7.0/apache2/php.ini /etc/php/7.0/apache2/php.ini.back then copy production ini file: $ sudo cp /usr/lib/php/7.0/php.ini-development /etc/php/7.0/apache2/php.ini ...


6

Using logs and and built-in support for debugging is definitely the most reasonable way. If you are doing some quick routing debugging at early stages and want to interact through the browser/client only, using the return 4xx "text"; directive may also give you the answer you want with very little effort. For example, http { server { listen ...


6

I have a piece of string, how many knots can I tie in it? Really it's down to monitoring how much active load there is on the server and then simulating additional load to push it to a point where you can say for certain. For math... 50M requests/month, assuming 30 day month works out to about 19-20 requests per second... I'd guess it's possible, depends ...


5

Just do what cron does. run-parts -v /etc/cron.daily run-parts -v /etc/cron.weekly etc -v prints the script names before they are run.


5

Can the server handle it? Yes. but.. Whether it actually will depends completely on your code. The servers you're viewing this page on currently handle about 75 million requests per month each, and they're pretty bored while doing it, peaking at about 10% CPU. So it's definitely doable. If you want to scale like that, you'll need to make sure that your ...


5

From a Docker perspective it is not important to match your in and out-of-container OS. Where it gets more important is when you have to think about patching and troubleshooting both -- if you have a mix of Debian, CentOS, and Alpine then you'll have to think about how to keep all of them up to date. The in-container OS is also relevant in its size. ...


5

First, let's clarify something: your certificates are public. Anyone can freely download them from your server. This is by design. The only file that needs to be kept truly private is the private key file that you generated when initially obtaining the certificate. Anyone that manages to get their hands on this file could potentially impersonate your service....


4

If this can help, just to complete a bit Mo's answer: Wildcards in ServerAlias also works on partial domain names, such as ServerName somename.dev ServerAlias *-mysite.dev It saved my life recently ^^ (a main site with subdomains for each sub app such as admin-somename.dev, bo-somename.dev, api-somename.dev...)


4

I know I'm a little late to the party here, but I recently ran into this myself when I was learning to use Vagrant, and the docs don't make it completely obvious. I was shutting down the VM with vagrant halt and then using vagrant up the next time I turned on my PC, and this would destroy the VM state and make you start over. In order to keep the same VM ...


4

Digital Ocean provides console access from the control panel. Use that to login when the system is down and gather information, When you have information use it to decide what to do. Anything else is guessing and with the information you have provided I guess Perseid Meteor shower. Being structured and methodical in your approach is much better than ...


4

I'm presuming your JS is executed in a browser-session, and not on the server itself. If that isn't the case, let me know. Yes, it is possible to move logs under DocumentRoot. However, it is considered a pretty major security vulnerability to put the access-logs in that location. This is because it is very easy for attackers to place custom text in a ...


4

What should I do to fix this? Add memory or reduce the load on memory from processes. Install monitoring Gather data. Use Scientific Method to work out where the bottlenecks are. Take appropriate action. Repeat as required.


4

Yes, you can use AWS for a site with a scale from 1 request a day to 1 million hits per second and beyond. You really need AWS education to use AWS effectively, including designing for cost savings. Off the top of my head things to pay attention to: Load balancing (ELB) Auto scaling (AWS auto scaling) with AMI images Cost control (you need to understand ...


4

a 1GB interface with the server and 5MB/s IO speed 5 Mb is slow over a 1Gb link. the server has a small HDD, 250GB. That's a comfortable size for a Windows Server, but how much of that is free for use? Windows really doesn't like running short of disk space, especially given that a chunk of that space is given over to the Swap (paging) file! How much ...


3

Solution that fixed the problem in my case: $ php -r 'var_dump(function_exists("gnupg_decrypt"));'; PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/gnupg.so' - **libgpgme.so.11: cannot open shared object file**: No such file or directory in Unknown on line 0 bool(false) $ ldd /usr/lib/php5/20100525/gnupg.so linux-vdso.so.1 => (...


3

Kerberos works but it may be easier to do it with LDAP alone in this case. Put the following in your VirtualHost settings for the wordpress site. With this config ldap.company.com needs to resolve to your AD Global Catalog(s) and you need an ID ldap-auth-svc with a password of Secretpassword so Apache has rights to access AD to authenciate the users. You may ...


3

An answer directly from XAMPP. (I share, even if not a direct xampp question, as it's listed as a canonical question for AMPP's stack) Is XAMPP production ready? XAMPP is not meant for production use but only for development environments. The way XAMPP is configured is to be open as possible to allow the developer anything he/she wants. For development ...


3

Another thing you can try is the "watch" command which can repetitively run a grep command on any log file you want. Using approriate watch command switches you can even highlight changes in log files in real time. For example: watch -d -n5 uptime


3

If you Amazon Linux has SElinux enabled you may be having trouble with that and need to allow httpd to read user's home directories setsebool httpd_enable_homedirs 1


3

Your error message says: because search permissions are missing on a component of the path which means that a parent directory does not allow Apache to traverse it. To find out what directory that is, use ls -ld on each directory in turn, or (Linux-only) use namei: namei -l /home/myuser/public_html You will then be shown the permissions and be able to ...


3

As @ceejayoz pointed out, new EBS volumes have a first-write penalty... but they also have a first-read penalty, particularly if created from a snapshot (or AMI, since those are backed by snapshots). You should pre-warm the volume, if you haven't already. It's not too late to do it, as you can do it nondestructively. It only needs to done once per volume.....


3

Well, 10 VM means you will have 10 VM to manage (update, monitor, ...) so in terms of resource utilization and cost it is better to consolidate. On the other hand, all sites on 1 VM means they will all share the same resources, the same OS & LAMP versions and you can have issues when 1 site needs different versions or becomes incompatible with the new ...


3

You have to create the router that redirect outgoing messages: intercept: driver = redirect domains = !+local_domains data = auditor@local.tld pipe_transport = address_pipe no_more Place that router at the very beginning of begin routers section to ensure each message will be proceeded. When message addressed to the ...


3

Exposing log files within the document root creates a massive vulnerability on a LAMP server - without sophisticated controls it allows anyone to deploy and run code on the server. As a developer you should know why this is, and have a better grasp of the terminology. That the logs sit outside the document root has nothing to do with whether you can access ...


3

Do. Not. Use. An. Admin. Panel. Ok? :) Seriously, though. They're universally clumsy, they do odd things to your servers that make them impossible or difficult to troubleshoot via standard means, and perhaps worst of all, they actively prevent you from learning proper systems administration, and from acquiring the knowledge and skills necessary to do your ...


3

I would say: Update CentOS if you need it (according to their site, the EOL is November 30, 2020) check here Apache tends to have security updates so maybe is a good idea to update if and when possible PHP is not backward compatible in lots of cases, do not update but only if the last number changes unless you know what you are doing! Same for MySQL This ...


3

When not specifically defined the bind-address defaults to * If the address is *, the server accepts TCP/IP connections on all server host IPv6 and IPv4 interfaces if the server host supports IPv6, or accepts TCP/IP connections on all IPv4 addresses otherwise. Use this address to permit both IPv4 and IPv6 connections on all server interfaces. This value ...


3

Apache virtual hosts. Use the Wordpress settings to update the site URL.


3

Disable repositories that are not available, either by editing the yum repo configuration file(s) in /etc/yum.repos.d/ or by using yum with the --disablerepo=repoidglob switch yum --disablerepo=zabbix remove mysql


Only top voted, non community-wiki answers of a minimum length are eligible