How to see a single html page on centOs server - centos

I run a local server and I installed centOS on it and I can access on this server with ssh command line. I set my dns name and etc.
on my server I create a user called: 'masoud'.
then I created a index.html file. now I want to see this index.html with my ip address. on other hand how can I see this index.html file on my browser?
I tested there url's on my browser but I cannot see anything.
92.168.15.9/index.html
92.168.15.9
92.168.15.9:80/index.html

Apache (or similar webserver) is installed?
Apache (or installed webserver) is running?
index.html is in the doc root (check apache configs)
index.html has the correct permissions/owner (see error/access logs)
Check the Apache error/access logs?
If there are firewalls, are they setup to allow http traffic to/from the server?

Related

How to configure apache2 on Raspberry pi to serve https?

I am trying to use a Raspberry Pi 4 Model B as a small web server. It works fine for unsecured http, both within my home LAN and over the net. I have obtained a domain name and SSL certificate and key file. I am testing the server by accessing it within my local network using a browser and the Pi hostname. Unsecured http works fine, but making an https request results in a delay and then a "host refused to connect" message on the browser.
I have found conflicting instructions on the Web as to which Apache configuration file needs to be edited to include paths to the SSLCertificateFile and SSLCertificateKeyFile.
Within /etc/apache2 there are sites-available and sites-enabled subdirectories and more than one *.conf file, but apparently I have not edited the right one.
So, first, which is the correct configuration file to edit with the certificate paths, and second, does Apache produce a log file somewhere that would reveal any error messages produced by errors in the certificate?
I found a more complete set of instructions that showed how to add a port 443 virtual host to the default-000.conf file. It is working now.

Expose Ngrok Web interface in same LAN

I have some issue to configurate Ngrok.
I have installed the Ngrok on linux CentOS server dedicated (IP 192.168.1.124), it works correctly the tunneling is ok.
My question is: how i can reach the web page on 127.0.0.1:4040 in order to check the traffic on my Ngrok server?
The web interface page is only accessible on the server where ngrok is running, but if this is a linux minimal server (without gui and any type of browser) I can't see it.
is there a way to make it accessible also in LAN?
e.g. I have another client that can reach the IP where ngrok is running but if i put on web browser http:\192.168.1.124:4040 nothing is showing.
I see from netstat that this port is not listening so isn't a firewall problem or other.
Is possible to change config of Ngrok? otherwise are there other possibilities ? do i have to use a reverse proxy or something like?
Any ideas?
thanks for your help,
Luca
Locate your ngrok's config file:
$ ngrok config check
Valid configuration file at /home/youruser/.config/ngrok/ngrok.yml
Add to the config file the following line:
web_addr: 192.168.1.124:4040
In case you want to expose it to all interfaces, you can replace that value with 0.0.0.0:4040

Domain Name Instead of Localhost In Eclipse

I've got a tomcat server instance running inside of eclipse. By default it uses a hostname similar to http://localhost:8080/MyApp/ is there some way to proxy this so I can use a domain name like http://example.com/ instead?
On the production server I use apache to proxy the request to point to the tomcat instance, but within eclipse I don't have that luxury.
I'm using Ubuntu. I thought maybe I could map the domain to point to the localhost version in /etc/hosts but that seems to only be the first step. From there I can't figure out how to point the domain to the tomcat url.
Add this to your hosts file, to access via domain name : localhost example.com
Now, You have couple of options :
Host file doesn't know about ports. You have to access your app like http://example.com:8080/MyApp
You can change your tomcat port 8080 to 80 so that you dont have to access it via port like this http://example.com/MyApp
To access your web application via http://example.com, you have to deploy your application in tomcat root. For that refer Deploying my application at the root in Tomcat

VM from Google Cloud SQL rejecting connection

I have set up a google cloud sql server using the tutorial on youtube. However, Whenever I try to connect to it through the browser, the connect to it through the browser, the error i am getting is ERR_CONNECTION_REFUSED . The firewalls I have set up correlate to whats in the browser. I can also SSH into the VM. But the VM always rejects my connection. I have been trying for days.
Here are my VM Settings allowing http connections
Here is my VM External IP Address
Here is what the browser tells me when i attempt to connect.
Are you referring to this video https://www.youtube.com/watch?v=_kQXgjIfLgo?
In that video there are some steps missing such as install the web server (e.g. Apache) and PHP in the VM. After you install them, you can execute the following command in the VM:
php /var/www/index.php
If it works you can see the source code of the resulting page and if not you'll have an error to solve (maybe a package to install like php-mysql).
Once you can see the resulting page in the VM you can try to load the page through the browser of your machine. If it still doesn't work there is an Apache or network misconfiguration.

How to find, properly configure MS Team Foundation server?

I have a win7 virtual machine, that has a postgresql installed. There is an (apache) Enterprise DB on my localhost:8080.
I have installed MS Team Foundation Server successfully, and I can see from the management console, that my "DefaultCollection" is online.
Browsing for localhost:8080/tfs or localhost:8080/tfs/DefaultCollection returns a 404 not found error. I had no say on what port I would like to use,
Can you help me find the proper address for this team foundation server? Or tell me how to configure it properly. (I am unfamiliar with this server configuring world, please provide detailed commands or material.)
It sounds like you must've installed PostgreSQL using the one-click installer for Windows, then ran the StackBuilder and installed Apache using StackBuilder.
If so, it's just an ordinary Apache install that you can configure just like normal. You need to either stop and disable any running Apache service in the Services control panel (services.msc).
Alternately, if you wish to continue using it but on a different port, edit the Apache configuration to set the Listen directive to something other than 8080 and change any NameVirtualHost and VirtualHost directives to use the new port, eg:
Listen 8080
NameVirtualHost *:8080
<VirtualHost *:8080>
... blah blah ...
</VirtualHost>
would become:
Listen 8181
NameVirtualHost *:8181
<VirtualHost *:8181>
... blah blah ...
</VirtualHost>
See:
Apache - Virtual Hosts
Apache - Listen
You can find the location of the Apache config file by examining the command that's being used to run Apache. That might be a batch file to start it and stop it, or a service command in the services control panel. It'll probably be called httpd.conf or apache2.conf..
They are 'proper' addresses, but unless the person trying to open the webpage has a valid TFS account then you will not be able to access TFS through the website.
Can you access: http://localhost:8080/tfs/web?
Is your Windows login allowed to access TFS server?
As Craig mentioned, you don't hive any information that could help diagnose what you're trying to achieve. Why are you trying to access TFS through its web endpoints? Did you make sure MSSQL and IIS are installed on the machine? Why have you got apache and postgresql installed on a ALM server that doesn't require them?
TFS is a very complex product, and even though the development team has made huge strides in making it easy to install, it's no small task to get a server working.