AWS Lightsail allows you to quickly make snapshots from your LAMP stack and deploy them later. If you one day decide to create a new instance of your snapshot and you happen to have an SSL certificate within your Apache config, you may see this error.
(98) Address already in use: make_sock: could not bind to address 0.0.0.0:80
This error means that Apache cannot start because your SSL certificate needs a password. Here's how to fix it:
Step 1 - Find the process that's hanging
There are a lot of different ways to do this. Here are a few:
Method 1: Use grep
.
grep -ri listen /etc/apache2
Method 2: Use process
then filter it with grep
.
ps -ef | grep apache
If you see something like this, proceed to step 2.
Method 3: Use netstat
and filter with grep
.
sudo netstat -ntlp | grep 80
If you see something like this, you've found it! In the screen show below, the culprit is a process with an id (pid
) of 1666.
Method 4: Show processes hung
ps wax | grep httpd
Step 2 - Kill those processes
sudo kill -9 process_id
Step 3 - Double Check Your Work
ps -ef | grep apache
Resources
![Transcribe Web3 lingo using Custom Vocabularies within AWS](/content/images/size/w800/2023/02/translate-web3-lingo.png)
![Deploy an ExpressJS application using Serverless, Express and API Gateway](/content/images/size/w800/2021/08/13-1.png)
Deploying Rails 5.x on AWS ElasticBeanstalk using AWS CodeCommit
How to deploy your Rails app on ElasticBeanstalk (including S3 buckets, security groups, load balancers, auto-scalling groups and more) using CodeCommit.
![Create CRUD-style apps using AWS Lambda and Serverless Framework](/content/images/size/w800/2019/01/api-gateway-lambda.png)