LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Viewing HTML file in network (https://www.linuxquestions.org/questions/linux-newbie-8/viewing-html-file-in-network-790150/)

vishnukumar 02-19-2010 04:49 AM

Viewing HTML file in network
 
Hi,

I am new to Linux. I have indexnew.html file in /var/www/html. I have to view this file in the browser within the network and without using Apache server. Because, my Apache server gets the request to my application. I used http://localhost/indexnew.html to open the file, but it gets to my application.

Thank you

vinaytp 02-19-2010 05:17 AM

Ofcourse you can open..give the file path in browser this way. If you have launched firefox with root previliges

Code:

file:///var/www/html/indexnew.html
OR

You can also try this way in you terminal
Code:

# firefox /var/www/html/indexnew.html &

vishnukumar 02-19-2010 06:32 AM

Quote:

Originally Posted by vinaytp (Post 3869213)
Ofcourse you can open..give the file path in browser this way. If you have launched firefox with root previliges

Code:

file:///var/www/html/indexnew.html
OR

You can also try this way in you terminal
Code:

# firefox /var/www/html/indexnew.html &

Thanks for your reply.

file:///var/www/html/indexnew.html

The above is possible to open the file within local. How to do, if i need to open within LAN?

mudangel 02-19-2010 06:53 AM

Quote:

Originally Posted by vishnukumar (Post 3869199)
Because, my Apache server gets the request to my application. I used http://localhost/indexnew.html to open the file, but it gets to my application.

What application?

vinaytp 02-19-2010 06:58 AM

Quote:

Originally Posted by vishnukumar (Post 3869273)
How to do, if i need to open within LAN?

Please specify which distro you are using ? It will be helpful if you update your profile with the distros you are using.

Could you please elaborate on why can't you use apache to view the file ?


yes there is a way through ftp. Try the following steps

1.
Code:

# cp indexnew.html /var/ftp/pub/
2. I assume vsftpd is your ftp daemon
Code:

# /sbin/service vsftpd start
3.
In your browser try
Code:

ftp://ip_addr_of_remote_machine/pub/indexnew.html

JimBrewster 02-19-2010 07:02 AM

Quote:

Originally Posted by vishnukumar (Post 3869273)
Thanks for your reply.

file:///var/www/html/indexnew.html

The above is possible to open the file within local. How to do, if i need to open within LAN?

There are many ways to do that. Basically, you will either have to log in to the host with ssh, or access a shared directory on the host with nfs or samba.


All times are GMT -5. The time now is 02:18 PM.