I'm trying to start install LAMP in my EC2 instance. I have followed all the steps in this website
( https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-lamp-amazon-linux-2.html )but unable to see the test page coming up once I open my DNS id. Checked whether the service is running by typing in sudo systemctl is-enabled httpd and it comes up as enabled. My port 80 is also open. Please help!
Related
I am a beginner on Django. And try to deploy a testproject on cloud server to check if it works or not.
Server: Ubuntu 16.04
And after I create virtualenv on the server with nginx installed.
I execute below:
python manage.py runserver 0.0.0.0:8000
And then I go to the browser to access my server's http://ip-address:8000.
But it failed to show anything of my application.
I already added the ip-address to ALLOWED_HOST. But still not working.
Are there any thoughts for this situation?
maybe this method work for you because it worked for mine on the ec2 instance on Amazon web server.
step1: go to your dashboard find launch-wizard menu and open it.
step2: Now click on inbound after that click on edit. Here click on Add rule and select Custom TCP rule & enter 8000 in port range. Now again click on Add rule and select HTTP and similarly do for HTTPS then click on save button.
step3: save and restart your AWS machine. Hopefully, your Django app runs on 8000 port.
For a Linux instance in the security group, follow these steps to verify the security group rule:
Connect to a Linux instance by using a password.
Run the following command to check whether TCP 80 is being listened. netstat -an | grep 80
If the following result returns, web service for TCP port 80 is enabled.
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
If not then there is a problem with your security group setup, please go through the official documentation and see how you can fix it:
https://www.alibabacloud.com/help/doc-detail/25471.htm
I have hosted my site using amazon web services, and the site was running fine for past 30 days. after 30days we can't able to get the site. Its went down, I don't what the major problem in that.
while loading in chrome its showing "This site can’t be reached" Error : ERR_CONNECTION_RESET
Please suggest me any solution regarding handling the aws regarding this problem, I'm new to aws.
Try restarting the Apache2 webserver:
For ubuntu
service apache2 restart
For linux
service httpd restart
If you receive a message that the restart has failed, identify which process is currently using your port:
netstat -tulpn | grep :80
This will output something like
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1607/apache2
The 'apache2' in this case is the name of the process using port 80.
'1607' here is the PID(process id), to shut it down execute
kill 1607
After this, try starting the service again
service httpd start #linux
service apache2 start #ubuntu
If this still doesn't work, try restarting the machine.
I'm trying to set up an SSH tunnel to access my server (currently an ubuntu 16.04 VM on Azure) to set up safe access to my django applications running on it.
I was able to imitate the production environment with Apache WSGI and it works pretty good but since I'm trying to develop the application I don't want to make it available to broader public right now - but to make it visible only for a bunch of people.
To the point: when I set up the ssh tunnel using putty on Windows 10 (8000 to localhost:8000) and I run http://localhost:8000/ I get the folowing error:
"Not Found HTTP Error 404. The requested resource is not found.".
How can I make it work? I run the server using manage.py runserver 0:8000.
I found somewhere that the error may be due to the fact that the application does not have access to ssh files, but I don't know whether that's the point here (or how to change it).
Regards,
Dominik
After hours of trying I was able to solve the problem.
First of all, I made sure putty connects to the server and creates the desired tunnel. To do that I right-clicked on the putty window (title bar) and clicked event log. I checked the log and found the following error:
Local port 8000 forwarding to localhost:8000 failed: Network error:
Permission denied
I was able to solve it by choosing other local port (9000 instead of 8000 in my instance).
Second of all, I edited the sshd_config file: sudo vi etc/ssh/sshd_config
and added these three lines:
AllowAgentForwarding yes
AllowTcpForwarding yes
GatewayPorts yes
I saved the file and restarted the ssh service:
sudo service ssh stop
sudo service ssh start
Now when I visit localhost:9000 everything works just fine.
I'm trying to install the enterprise edition of neo4j on an existing EC2 (Amazon linux) instance. So far I've
wget "link to enterprise"
untar the file
renamed and moved the folder to NEO4J_HOME
then went into the config files for neo4j.properties to make the following changes:
# Enable shell server so that remote clients can connect via Neo4j shell.
remote_shell_enabled=true
# The network interface IP the shell will listen on (use 0.0.0 for all interfaces)
remote_shell_host=127.0.0.1
# The port the shell will listen on, default is 1337
remote_shell_port=1337
EDITED Christophe Willemsen pointed out that for my original error, I had forgotten to restart the server at that point but I was still unable to access the web server while it was running. So to make it more clear, I've edited the remaining post:
I went to neo4j-server.properties and uncommented:
org.neo4j.server.webserver.address=0.0.0.0
And start the server
NEO4J_HOME/bin/neo4j start
WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow
Starting Neo4j Server...WARNING: not changing user
process [28557]... waiting for server to be ready..... OK.
http://localhost:7474/ is ready.
checking the status:
NEO4J_HOME/bin/neo4j status
Neo4j Server is running at pid 28557
I can run the shell but the when I go to localhost 7474 I still can not connect
Any help would be appreciative. The only tutorial or help I've found assumed I was starting from scratch with a new instance. If someone could provide some instructions for installing or fix my configuration that would be great.
Thanks!
You have to edit neo4j-server.properties and uncomment the line with:
org.neo4j.server.webserver.address=0.0.0.0
So that the db listens on an external interface not just localhost, and you have to open the port (7474) in your firewall rules.
Make sure to secure access to the db though:
http://neo4j.com/docs/stable/security-server.html
Hi everyone
I have a problem.
I stopped service named, exim and dovecot, but after a period of time, these services auto started again. Until now, I don't know why this happen even though, I was tried search for this issue but can't find out anything. please help me how to solve this problem..
Thank you so much!!!
This works for me:
Login as root on your server and force-stop the services:
service named stop
service exim stop
service dovecot stop
Next is to configure VestaCP to not start the services when the server is beeing rebooted:
chkconfig named off
chkconfig exim off
chkconfig dovecot off
And you're done. You can check by rebooting the server. You can also do this with other services:
clamd, spamassasin (if you installed the high ram VestaCP version and don't need the mail services)_
httpd, nginx, mysqld and vsftpd (for if you make a dns-only server)
You get the point, hope this works. Good luck
it just about when you create web domain, but have check the option DNS support and mail support. So, vesta will start service named and dovecot. you just ceate a cronjob with these command:
sudo /usr/local/vesta/bin/v-stop-service dovecot
sudo /usr/local/vesta/bin/v-stop-service named
sudo /usr/local/vesta/bin/v-stop-service exim
or, in the server, add these command line
JOB='8' MIN='0' HOUR='/6' DAY='' MONTH='' WDAY='' CMD='sudo /usr/local/vesta/bin/v-stop-service exim' SUSPENDED='no' TIME='12:32:31' DATE='2014-05-22'
JOB='9' MIN='0' HOUR='/6' DAY='' MONTH='' WDAY='' CMD='sudo /usr/local/vesta/bin/v-stop-service named' SUSPENDED='no' TIME='12:32:05' DATE='2014-05-22'
JOB='10' MIN='0' HOUR='/6' DAY='' MONTH='' WDAY='' CMD='sudo /usr/local/vesta/bin/v-stop-service dovecot' SUSPENDED='no' TIME='12:31:50' DATE='2014-05-22'
if you have any issue, give me message :)