Sponsored Content
Top Forums Web Development html link to images in /tmp directory Post 302261713 by Ikon on Tuesday 25th of November 2008 11:30:54 AM
Old 11-25-2008
Code:
<img src="/tmp/Energy_and_Power_on_Target-img.png">

the src has to be accessable from the internet/intranet. /tmp is not.


You would have to add an Alias to you httpd.conf(apache) file in the correct place.

Code:
Alias /tmp/ "/tmp/"

This would link http://www.somedomain.com/tmp to /tmp

But Im not sure you really want to do this. Why are you storing images in tmp? this is a "temporary" place to images and could be wiped at anytime, usually on reboot.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

/tmp directory gets to 100%

Eventhough there is no visible feed to the /tmp dir, when I shut my apps engine it gets down to 4%. Upon restarting my engine, give it about 10-15 minutes and the /tmp gets to a 100% again. My engine is running on AIX 4.3. Engines job is to process metapp (metacode to PDF) completed files and then... (2 Replies)
Discussion started by: buRst
2 Replies

2. Red Hat

/tmp directory

i heard once that the /tmp directory was a ramfs (swap) that is cleared at reboot time, is this still the case in redhat EL 3 and 4 ? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

3. Web Development

Rewrite rules to change “link.html?hl=es” to “/es/link.html” etc?

Hey! Does anyone know how to create rewrite rules to change: “link.html?hl=en” to “/en/link.html” “link.html?hl=jp” to “/jp/link.html” “link.html?hl=es” to “/es/link.html” etc? Where "link.html" changes based on the page request? (2 Replies)
Discussion started by: Neo
2 Replies

4. Shell Programming and Scripting

How can I execute a shell script from an html link?

I want to execute a shell script when clicking on an html link. I want the output of the script to be shown on the webpage. Whats the best way to achieve this? (6 Replies)
Discussion started by: streetfighter2
6 Replies

5. Shell Programming and Scripting

Referring to attached images in html email body through mailx

encoding type for images? (5 Replies)
Discussion started by: biswasbaishali
5 Replies

6. Shell Programming and Scripting

Need script to remove millions of tmp files in /html/cache/ directory

Hello, I just saw that on my vps (centOS) my oscommerce with a seo script has created millions of tmp files inside the /html/cache/ directory. I would need to remove all those files (millions), I tried via shell but the vps loads goes to very high and it hangs, is there some way to do a... (7 Replies)
Discussion started by: andymc1
7 Replies

7. AIX

\tmp Directory is full up to 99%.

Dear All, We are on AIX OS, /tmp directory is filled up to 99% percent, Please suggest, How to get free space for "/tmp"? which files can be deleted from /tmp? and How to delete it? is there any commands..... Thanks in advance, Its very urgent, Helpful answers will be appreciated, Please... (7 Replies)
Discussion started by: kak
7 Replies

8. Shell Programming and Scripting

Difficulty cleaning references to duplicated images in HTML code

Hi, I need to search and replace references to duplicated images in HTML code. There are several groups of duplicated images, which are visually the same, but with different filenames. I managed to find the duplicated files themselves, but now I need to clean the code too. I have a CSV file with... (9 Replies)
Discussion started by: mdart
9 Replies

9. Web Development

Changing Images in HTML

Hi, I recently bought shared hosting at asphostportal.com. Now, I have little problem. Could you help me please? How to change the images after every 5 seconds in html? The images should display in the same places for every 5 seconds? can anybody send me code please. Thanks. (4 Replies)
Discussion started by: minnawanda
4 Replies
Catalyst::Manual::Deployment::Apache::FastCGI(3pm)	User Contributed Perl Documentation	Catalyst::Manual::Deployment::Apache::FastCGI(3pm)

NAME
Catalyst::Manual::Deployment::Apache::FastCGI - Deploying Catalyst with FastCGI on Apache Setup 1. Install Apache with mod_fastcgi mod_fastcgi for Apache is a third-party module, and can be found at <http://www.fastcgi.com/>. It is also packaged in many distributions (for example, libapache2-mod-fastcgi in Debian). You will also need to install the FCGI module from CPAN. Important Note! If you experience difficulty properly rendering pages, try disabling Apache's mod_deflate (Deflate Module), e.g. 'a2dismod deflate'. Apache 1.x, 2.x Apache requires the mod_fastcgi module. The same module supports both Apache 1 and 2. There are three ways to run your application under FastCGI on Apache: server, static, and dynamic. Standalone server mode FastCgiExternalServer /tmp/myapp.fcgi -socket /tmp/myapp.socket Alias /myapp/ /tmp/myapp.fcgi/ # Or, run at the root Alias / /tmp/myapp.fcgi/ # Optionally, rewrite the path when accessed without a trailing slash RewriteRule ^/myapp$ myapp/ [R] The FastCgiExternalServer directive tells Apache that when serving /tmp/myapp to use the FastCGI application listening on the socket /tmp/mapp.socket. Note that /tmp/myapp.fcgi MUST NOT exist -- it's a virtual file name. With some versions of "mod_fastcgi" or "mod_fcgid", you can use any name you like, but some require that the virtual filename end in ".fcgi". It's likely that Apache is not configured to serve files in /tmp, so the Alias directive maps the url path /myapp/ to the (virtual) file that runs the FastCGI application. The trailing slashes are important as their use will correctly set the PATH_INFO environment variable used by Catalyst to determine the request path. If you would like to be able to access your app without a trailing slash (http://server/myapp), you can use the above RewriteRule directive. Static mode The term 'static' is misleading, but in static mode Apache uses its own FastCGI Process Manager to start the application processes. This happens at Apache startup time. In this case you do not run your application's fastcgi.pl script -- that is done by Apache. Apache then maps URIs to the FastCGI script to run your application. FastCgiServer /path/to/myapp/script/myapp_fastcgi.pl -processes 3 Alias /myapp/ /path/to/myapp/script/myapp_fastcgi.pl/ FastCgiServer tells Apache to start three processes of your application at startup. The Alias command maps a path to the FastCGI application. Again, the trailing slashes are important. Dynamic mode In FastCGI dynamic mode, Apache will run your application on demand, typically by requesting a file with a specific extension (e.g. .fcgi). ISPs often use this type of setup to provide FastCGI support to many customers. In this mode it is often enough to place or link your *_fastcgi.pl script in your cgi-bin directory with the extension of .fcgi. In dynamic mode Apache must be able to run your application as a CGI script so ExecCGI must be enabled for the directory. AddHandler fastcgi-script .fcgi The above tells Apache to run any .fcgi file as a FastCGI application. Here is a complete example: <VirtualHost *:80> ServerName www.myapp.com DocumentRoot /path/to/MyApp # Allow CGI script to run <Directory /path/to/MyApp> Options +ExecCGI </Directory> # Tell Apache this is a FastCGI application <Files myapp_fastcgi.pl> SetHandler fastcgi-script </Files> </VirtualHost> Then a request for /script/myapp_fastcgi.pl will run the application. For more information on using FastCGI under Apache, visit <http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html> Authorization header with mod_fastcgi or mod_cgi By default, mod_fastcgi/mod_cgi do not pass along the Authorization header, so modules like "Catalyst::Plugin::Authentication::Credential::HTTP" will not work. To enable pass-through of this header, add the following mod_rewrite directives: RewriteCond %{HTTP:Authorization} ^(.+) RewriteRule ^(.*)$ $1 [E=HTTP_AUTHORIZATION:%1,PT] 2. Configure your application # Serve static content directly DocumentRoot /var/www/MyApp/root Alias /static /var/www/MyApp/root/static FastCgiServer /var/www/MyApp/script/myapp_fastcgi.pl -processes 3 Alias /myapp/ /var/www/MyApp/script/myapp_fastcgi.pl/ # Or, run at the root Alias / /var/www/MyApp/script/myapp_fastcgi.pl/ The above commands will launch 3 app processes and make the app available at /myapp/ Standalone server mode While not as easy as the previous method, running your app as an external server gives you much more flexibility. First, launch your app as a standalone server listening on a socket. script/myapp_fastcgi.pl -l /tmp/myapp.socket -n 5 -p /tmp/myapp.pid -d You can also listen on a TCP port if your web server is not on the same machine. script/myapp_fastcgi.pl -l :8080 -n 5 -p /tmp/myapp.pid -d You will probably want to write an init script to handle starting/stopping of the app using the pid file. Now, we simply configure Apache to connect to the running server. # 502 is a Bad Gateway error, and will occur if the backend server is down # This allows us to display a friendly static page that says "down for # maintenance" Alias /_errors /var/www/MyApp/root/error-pages ErrorDocument 502 /_errors/502.html FastCgiExternalServer /tmp/myapp.fcgi -socket /tmp/myapp.socket Alias /myapp/ /tmp/myapp.fcgi/ # Or, run at the root Alias / /tmp/myapp.fcgi/ More Info Catalyst::Manual::Deployment::FastCGI. AUTHORS
Catalyst Contributors, see Catalyst.pm COPYRIGHT
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-01-20 Catalyst::Manual::Deployment::Apache::FastCGI(3pm)
All times are GMT -4. The time now is 03:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy