Local wordpress installation issues on port 8080 - wordpress

I'm using XAMPP as my local apache server. For some reason I can't use Port 80 and hence I changed the Listen and Servername to localhost:8080.
Now when I'm trying to install a wordpress site I'm getting the below error if I put localhost:3306 or localhost
wp-installation-error
And If I try to specify localhost:8080 as DB host, it goes into a "waiting for localhost" and times out after few minutes.
setup
Can someone help me how to set it up?

Related

Node js Application running on EC2 but not accessible in browser using Nginx

I'm a newbie to Nginx. I cannot access my Node.js application that I deploy on AWS EC2 using Nginx reverse proxy. If I do curl http://localhost:3000 I can see the application is running successfully on the server(I'm using pm2 for running node server). But when I try to access it in my browser or postman using public DNS I get the error This site can't be reached and the request gets timeout. Here's my Nginx configuration (I have followed a number of tutorials for this)
The configuration file is named nginx.conf and is in /etc/nginx/sites-enabled directory. If I do sudo nginx -t it says syntax is ok and the test is successful. Also I can see the Nginx is running using command sudo systemctl status nginx What could be the possible reason for this behaviour?
I figured it out the problem wasn't with the Nginx configuration actually I needed to allow public access for port 80 on my ec2 instance which is blocked by default. I allowed port 80 and everything is working fine. This blog helped me. Visit it for me details on how to enable port 80 for your ec2 instance.

MAMP http request to port 80 returns connection refused error on port 8888

I have set the Apache port to 80 on MAMP. The the request to "http://localhost/MAMP" (the startup page, port 80) works fine. However, when I try to access the "http://localhost/" it gives a connection refused error. on port 8888?
the MAMP page works fine
http://localhost/ redirects to localhost:8888 resulting in error
http request and corresponding error message
Things I have tried:
disable mac built-in Apache with apachectl stop - Does not work
check activity on port 80 (nothing suspicious) - Does not work
port 8888 works fine but my goal is to have an simple url format to able to use xdebug with it.

Apache not listening on port 256 with multiple sites

I have 3 sites.
One runs on port 80, one runs on port 1337, and one runs on port 256.
I created both of the first two with just command line utils and the last one, the one that isn't working, from webmin on a chromebook. The server is being hosted on a Raspberry Pi 3 and none of the sites have too high of a memory limit (only about 100MB).The last site, the one running on port 256, isn't functioning properly. It returns an ERR_CONNECTION_REFUSED error in Google Chrome and I don't currently have the ability to check on the Pi itself. I have restarted Apache and the Pi.
What am I doing wrong? I'm using Apache2 and I'm signed in as root.
UPDATE: In Webmin, after running wget localhost:256, I've encountered this error:
--2021-01-13 10:25:43-- http://localhost:256/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:256... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:256... failed: Connection refused.
It's not just an issue with my laptop. This is an Apache configuration problem, it appears.
ANOTHER UPDATE: Here's the configuration file:
<VirtualHost _default_:256>
DocumentRoot /var/www/wiki
<Directory "/var/www/wiki">
allow from all
Options None
Require all granted
</Directory>
</VirtualHost>
Make sure apache is listening on the ports. You can use netstat:
netstat -tupan | grep -i listen
If the 3 ports are liste, the problem might be elsewhere.
If a port is missing, check if httpd.conf contains this line:
Listen 256
If it does, check error logs for some error that will help you find what's wrong.

SSH forward port to local host name

I have next setup:
Local host - my work PC
Project VM - Vagrant box with project files, runned on my work PC
Remote host - remote PC, from which I need to access hosts on Project VM
Project VM setup (/etc/hosts on Local host):
192.168.100.102 host1.vm.private
192.168.100.102 sub1.host1.vm.private
192.168.100.102 sub2.host1.vm.private
"host1" subdomains resolved by application router and served by nginx (config for "host1.vm.private" on Project VM):
server {
listen 80;
server_name ~^(.+\.)?host1\.vm\.private$;
...
}
I need to make "sub(1|2|N).host1.vm.private" reachable from remote host. How this can be done?
So, i found the solution: Trouble SSH Tunneling to remote server
The main issue is that invalid HTTP header was sent and nginx cant resolve a virtual host.
Run on local PC ssh -R 8888:192.168.100.102:80 <remote_pc_credentionals>. Or, run "inversed" command with ssh -L flag on remote PC.
Add "sub1.host1.vm.private" to /etc/hosts on remote PC: 127.0.0.1 sub1.host1.vm.private
OR
Send "Host" header with each request: curl -H "Host: sub1.host1.vm.private" "http://localhost:8888/some/path"

https://localhost:8080 is not working but http://localhost:8080 is working well

I am using Ubuntu 12.04LTS 64 bit pc.JBOSS as my local pc server and i have a project which is using mysql as database and struts framework.I can easily access my project using
http://localhost:8080
but when I want to access my project using
https://localhost:8080
It shows an error.
The connection was interrupted
The connection to 127.0.0.1:8080 was interrupted while the page was loading.
I have also checked
$ sudo netstat -plntu | grep 8080
this command which output is
"tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 5444/java"
If i kill this process,my project also killed.
and i also mentioned u that my 80 port is free also.
Can you tell me what is the problem is occured for which I cannot access my project in my local pc using https.
Advance Thanks for helping.
SSL has to be on a different port. Here is the breakdown:
http:// watched on port, typically 80
https:// watched on a different port, typically 443
You need to RUN SSL on a different port.
Listen 8081
SSL VirtualHost
<VirtualHost *:8081>
# SSL Cert info here
....
</VirtualHost>
> service httpd restart

Resources