What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

I'm looking for the best way to highlight Apache HTTP configuration :

Here an example with lang-java :

Here an example with lang-xml, which really not satisfy me:

<VirtualHost *:80>

  ServerName myapp-homintranet.myorg.com
  ServerAlias myapp-homintranet

  ProxyRequests Off
  ProxyPass /myapp balancer://jbosscluster/myapp stickysession=JSESSIONID nofailover=On
  ProxyPassReverse /myapp http://server01.myorg.com:8080/myapp

  #Conf load-balancing Jboss
  <Proxy balancer://jbosscluster>
    BalancerMember http://server01.myorg.com:8080
    BalancerMember http://server02.myorg.com:8080
    ProxySet lbmethod=byrequests
  </Proxy>

</VirtualHost>

Here an example with lang-java, a bit better, but yet not enough

<VirtualHost *:80>

  ServerName myapp-homintranet.myorg.com
  ServerAlias myapp-homintranet

  ProxyRequests Off
  ProxyPass /myapp balancer://jbosscluster/myapp stickysession=JSESSIONID nofailover=On
  ProxyPassReverse /myapp http://server01.myorg.com:8080/myapp

  #Conf load-balancing Jboss
  <Proxy balancer://jbosscluster>
    BalancerMember http://server01.myorg.com:8080
    BalancerMember http://server02.myorg.com:8080
    ProxySet lbmethod=byrequests
  </Proxy>

</VirtualHost>

I didn't found any extension for google-prettify and apache http. So, is there any language closer to this syntax? Do you know an another way to highlight it?

share|improve this question
    
Do you have an example of how you'd prefer it to be highlighted? –  Tim Stone Jun 16 '12 at 23:14
    
I don't have some real example, ... maybe vi / vim syntax highlighting would be the best ? –  Jean-Rémy Revy Jun 18 '12 at 11:23

1 Answer 1

up vote 3 down vote accepted

I'm not sure .htaccess syntax highlighting is a very high demand form. However, the lang-bsh syntax highlighting looks pretty decent:

<VirtualHost *:80>

  ServerName myapp-homintranet.myorg.com
  ServerAlias myapp-homintranet

  ProxyRequests Off
  ProxyPass /myapp balancer://jbosscluster/myapp stickysession=JSESSIONID nofailover=On
  ProxyPassReverse /myapp http://server01.myorg.com:8080/myapp

  #Conf load-balancing Jboss
  <Proxy balancer://jbosscluster>
    BalancerMember http://server01.myorg.com:8080
    BalancerMember http://server02.myorg.com:8080
    ProxySet lbmethod=byrequests
  </Proxy>

</VirtualHost>

At least it doesn't highlight all the URLs as comments past the //...

Personally, I would just use lang-none for plain black text.

share|improve this answer
    
Ideed, lang-bsh is almost suffisient. I'm waiting for other replies, but it seems that's the better answer it could be given (at least, what I was expecting) –  Jean-Rémy Revy Jun 18 '12 at 11:25
    
Well, I didn't actually test them all, but a list of all the available ones you can use can be found here. You're free to switch them out one by one, but if nothing there is satisfying, then no, there's nothing better you can use. –  animuson Jun 18 '12 at 17:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .