Tag Info

Hot answers tagged

13

You could do this: Work with mod_rewrite to change requests from /some/static/page.html to /htmlinjector.php?url=/some/static/page.html then use PHP (or whatever you find appropriate) to do the file-manipulation. Add an output cache to improve performance. As an alternative, Apache Handlers sound helpful: Modifying static content using a CGI ...


10

Error pages should always be served with the correct status codes.


10

For Apache, there is the module mod_asis, which does just that - reads the file and sends it on its merry way as a complete HTTP response. This module is shipped with Apache by default, but you need to enable it first (see the docs, there's a reasonable example).


9

You need to tell the MUA that the content contains HTML. Traditionally this is done using MIME. Try adding the following header lines to your message: Mime-Version: 1.0 Content-Type: text/html You may need to add a Content-Transfer-Encoding header as well. The Wikipedia page on MIME has more details, including links to relevant RFCs. Update: This worked ...


9

Honestly? Hire someone to manage your server. If you have a 1.3 TB database, cPanel is not for you. Given the amount of data, you're going to need a pretty optimized MySQL server in order to get anywhere near acceptable performance. cPanel is not exactly ideal for very large websites (it severely limits the amount of serverside settings you can change ...


9

Yes. There are hundreds, perhaps thousands of database servers available to you. To be frank, if you haven't been successful in getting MySQL working on Ubuntu, you're either: Reading really bad documentation Reading good documentation but not understanding/executing properly Giving up too soon MySQL should be trivial to get running on Ubuntu. Quite ...


8

The biggest one I hear is testing legacy code against a new version. With so many companies having internal web applications which they haven't touched for a while, they often site system instability and the high cost with testing all the production systems against a new version. It's also difficult to get any large organization to do anything faster than ...


8

I hate to be blunt, but if you need to ask, then you probably aren't the person who should be deciding.


8

Personally, I think nginx provides the right split between the things it does itself (receiving and processing HTTP requests) and what it delegates to other processes (dynamic page generation). Whilst it is less effort to setup Apache to serve PHP requests, running everything within Apache is a bit of a security and configuration problem (all files that are ...


7

Have you seen wkhtmltopdf? Can't say how well it works personally, but it seems like exactly what you need. Only problem may be, with this and any 'browser automation' solutions, that it will pick up the print stylesheet rather than the screen display one so the PDF may not be exactly what you see on screen.


7

I am not sure why this hasn't been mentioned in the list of answer. Sorry if it took me 2 years to see this question... The easiest, most powerful way to do what you want to do what you want is using an Apache filter. Just have: ExtFilterDefine css_changer mode=output intype=text/html cmd="/some/php/script.php" SetOutputFilter css_changer A possible ...


7

Try http://www.lighttpd.net/ Lighttpd, Its used by Google,Sourceforge and a other large organizations. Its pretty small and has been know to have the edge over speed all in this one small box.


7

Google analytics To handle large log files, you might want to look into log rotators: http://www.cyberciti.biz/faq/how-do-i-rotate-log-files/


7

Have you considered installing Lighttpd? It sounds pretty much like what you need. Also look at the package details for Ubuntu and the article on Softpedia. Possibly ignoring the PHP and MySQL references? Edit: after installing the web server, do what RainyRat has suggested ;)


6

nginx


5

The author of nginx says that nginx is aimed on serving static files and being frontend, forwarding request which require dynamic pages to other servers like apache. Another good idea is to cache apache's dynamic request with nginx if data is rarely updated, for example, an archived blog post.


5

The Webalizer is very good at mining your Apache logs for stats -- who visits, from what IP addresses, a breakdown of the kinds of domains those IPs reverse-resolve to (.com, .net, .co.uk, .ru, etc.), what their browsers claim to be (which is usually, though not always, what they actually are), what operating system the user is using (again, provided the ...


5

SSL has nothing to do with your php or html-pages. It's encryption of communication between (web-)server and client (usually a webbrowser) on the application layer. The way to set it up depends on the web-server used. To cover the two most popular servers: Van's Apache SSL/TLS mini-HOWTO How To Set Up an HTTPS Service in IIS SSL-Certificates need to be ...


5

While varnish is absolutely fantastic with it's flexible VCL, it's really more suitable for caching dynamic websites. There seem to be general consensus about nginx outperforming varnish (atleast on small static objects). You can either proxy_cache, fastcgi_cache or simply serve from disk directly using nginx. I know it do support memcached, but the only ...


5

The solution is actually in the code of your web pages and not in any configuration that you can do. Presuming that you are using JSP to generate your HTML, you need to change links like this: <a href="/home">a link to the root of my webapp</a> To look like this: <a href="<%= response.encodeURL(request.getContextPath() + "/home") ...


5

Typical Web filtering appliances/services classify web sites into categories, and then each category is permitted or blocked based on corporate policy. Some, such as Barracuda, use a reputation based system. They almost always also allow for local exceptions. So, if you host the jQuery code on your own site, it will be permitted or blocked the same as the ...


5

Perl is (as always) your friend. I think this will do it: perl -n -mHTML::Entities -e ' ; print HTML::Entities::decode_entities($_) ;' E.g.: echo '"test" &amp; test $test ! test @ # $ % ^ &amp; *' |perl -n -mHTML::Entities -e ' ; print HTML::Entities::decode_entities($_) ;' With output: someguy@somehost ~]$ echo '"test" &amp; test $test ! ...


4

On Mac OS X you are able to print to PDF, this works extremely well for my resume which I then have printed out at Kinkos and give out to potential employers.


4

Here is a tutorial on how to use mod_proxy_html to edit the links on a webpage ( the content). You might be able to apply this modify the html you want. UPDATE: Are you sure you want to go this route? I think Apache is meant to serve content, not create it. This would probably go in the view part of a MVC framework. The reason I wouldn't recommend this ...


4

mod_sed is a good fit here. You can create an output filter that matches the closing head or body tag, for example, and insert your html before it.


4

Many organizations are looking at this from the other direction. Absent at least one compelling reason to upgrade, they see no reason to do so. And this logic is hard to argue with. An upgrade will cost money, will trigger problems, will break things, and will be a distraction. Why fix what isn't broken? Particularly when there is a whole bunch of stuff ...


4

Doesn't look like there's any analytics code on there, so that's most likely the problem. :-) Copy and paste your code from the analytics site to your website and paste it down near the BOTTOM of the page before the ending </body> tag. Also, I don't think you're going to see any reporting right away. I think it takes 12-24 hours before you start ...


4

I hate to be vague but, either will work. Choose whichever OS that you are most comfortable with.


4

Make sure you have: A CNAME record in your DNS settings so that www.getfitcore4.com (CNAME) points to getfitcore4.com (A). A web server set up to handle requests at www.getfitcore4.com, not just getfitcore4.com.



Only top voted, non community-wiki answers of a minimum length are eligible