How to change the default http://192.168.1.100:8080/webdav/*.pdf | Unix Linux Forums | SCO

  Go Back    


SCO Santa Cruz Operation (SCO) was a software company based in Santa Cruz, California which was best known for selling three UNIX variants for Intel x86.

How to change the default http://192.168.1.100:8080/webdav/*.pdf

SCO


Tags
pdf, sco, webdav

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-01-2010
hrmaldonado hrmaldonado is offline
Registered User
 
Join Date: Oct 2010
Last Activity: 1 September 2011, 11:01 PM EDT
Location: Guatemala
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
How to change the default http://192.168.1.100:8080/webdav/*.pdf

I need to access images files from the /u partition, usign the web services of http:

The default directory of the http to root is partition.


http//192.168.1.100:8080/webdav/*.jpg


= /usr/lib/apache/tomcat-5.5.31/webapps/webdav/*.pdf

How could I change to


http//192.168.1.100:8080/u/images/*.jpg

the use /u Partition ? like /u/images/*.jpg, etc

Thank you for your help.
The Following User Says Thank You to hrmaldonado For This Useful Post:
lal (06-14-2013)
Sponsored Links
    #2  
Old 12-01-2010
jgt's Avatar
jgt jgt is offline Forum Advisor  
Registered User
 
Join Date: Apr 2007
Last Activity: 16 April 2014, 11:06 AM EDT
Location: 44.21.48N 80.50.15W
Posts: 1,516
Thanks: 1
Thanked 149 Times in 144 Posts
We don't change the webroot (/usr/lib/apache/htdocs). We use the following, where pdf versions of invoices are stored in /u/pdf/invoice/00 thru 99/invoice_number.pdf
Set permissions so that 'nouser' had search and read access.


Code:
<?php                                                                   
 session_start();                                                       
 $REMOTE_ADDR = $_SERVER['REMOTE_ADDR'];                                
 $INVOICE  =  $_SERVER['QUERY_STRING'];                                 
 $INVOICE = rtrim(`echo $INVOICE|cut -d= -f2`);                         
 $DIR = $INVOICE % 100;                                                 
 $uniq = session_id();                                                  
 $UNIQ = `echo $uniq|cut -c3-10`;                                       
 $UNIQ = rtrim($UNIQ);                                                  
// We'll be outputting a PDF                                            
                                                                        
// It will be called downloaded.pdf                                     
// header('Content-Disposition: attachment; filename="statement.pdf"'); 
                                                                        
// The PDF source is in original.pdf                                    
 $source='/u/pdf/invoice/'.$DIR.'/'.$INVOICE.'.pdf';                    
                                                                        
if (file_exists($source)) {                                             
        header('Content-type: application/pdf');                        
        readfile($source);                                              
} else {                                                                
    echo "Invoice $source is not available";                            
}                                                                       
?>

The Following User Says Thank You to jgt For This Useful Post:
Neo (02-01-2014)
Sponsored Links
    #3  
Old 12-02-2010
hrmaldonado hrmaldonado is offline
Registered User
 
Join Date: Oct 2010
Last Activity: 1 September 2011, 11:01 PM EDT
Location: Guatemala
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
I have a question about this..

Where Did I use this instruccions ?
    #4  
Old 12-02-2010
jgt's Avatar
jgt jgt is offline Forum Advisor  
Registered User
 
Join Date: Apr 2007
Last Activity: 16 April 2014, 11:06 AM EDT
Location: 44.21.48N 80.50.15W
Posts: 1,516
Thanks: 1
Thanked 149 Times in 144 Posts
We create a link in the first page,
Code:
  href="showinvoice.php?recno=12345   img src="../images/showinvoice.gif" height="30" border="0" width="140"

I have left out the html tags clicking on the link retrieves the pdf file from /u/pdf...... and displays it in the web page

Last edited by jgt; 12-02-2010 at 01:25 PM..
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
running localhost:8080 on firefox gives error . madhumathikv Shell Programming and Scripting 2 08-08-2009 12:51 AM
Please help with Webdav transfer script brazen1445 Shell Programming and Scripting 1 03-12-2008 11:37 AM
enabling port 8080 moxxx68 UNIX for Dummies Questions & Answers 3 01-09-2005 04:39 AM
Resolving port 8080 in DNS korfnz IP Networking 1 10-18-2004 06:42 PM



All times are GMT -4. The time now is 12:43 AM.