Apache config, setup a dev subdomain

  • PolishHurricane
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1585

Post 3+ Months Ago

Hey, I currently have an httpd.conf and it is is configured with sub-domain sites and a dev subdomain. Is there any way to simplify this??

Code: [ Select ]
<VirtualHost *:80>
DocumentRoot "/var/www/html/mysite.com/"
ServerName mysite.com
# ServerAlias mysite.com
<Directory />
allow from all
Options +Indexes
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName services.mysite.com
ErrorDocument 404 /error/404.php
DocumentRoot "/var/www/html/services.mysite.com"
<Directory />
allow from all
Options ExecCGI FollowSymLinks Includes Indexes
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName admin.mysite.com
AllowEncodedSlashes On
ErrorDocument 404 /error/404.php
DocumentRoot "/var/www/html/admin.mysite.com"
<Directory />
allow from all
Options ExecCGI FollowSymLinks Includes Indexes
</Directory>
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "/var/www/html/dev/mysite.com/"
ServerName dev.mysite.com
# ServerAlias mysite.com
<Directory />
allow from all
Options +Indexes
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName dev.admin.mysite.com
AllowEncodedSlashes On
ErrorDocument 404 /error/404.php
DocumentRoot "/var/www/html/dev/admin.mysite.com"
<Directory />
allow from all
Options ExecCGI FollowSymLinks Includes Indexes
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName dev.services.mysite.com
ErrorDocument 404 /error/404.php
DocumentRoot "/var/www/html/dev/services.mysite.com"
<Directory />
allow from all
Options ExecCGI FollowSymLinks Includes Indexes
</Directory>
</VirtualHost>
  1. <VirtualHost *:80>
  2. DocumentRoot "/var/www/html/mysite.com/"
  3. ServerName mysite.com
  4. # ServerAlias mysite.com
  5. <Directory />
  6. allow from all
  7. Options +Indexes
  8. </Directory>
  9. </VirtualHost>
  10. <VirtualHost *:80>
  11. ServerName services.mysite.com
  12. ErrorDocument 404 /error/404.php
  13. DocumentRoot "/var/www/html/services.mysite.com"
  14. <Directory />
  15. allow from all
  16. Options ExecCGI FollowSymLinks Includes Indexes
  17. </Directory>
  18. </VirtualHost>
  19. <VirtualHost *:80>
  20. ServerName admin.mysite.com
  21. AllowEncodedSlashes On
  22. ErrorDocument 404 /error/404.php
  23. DocumentRoot "/var/www/html/admin.mysite.com"
  24. <Directory />
  25. allow from all
  26. Options ExecCGI FollowSymLinks Includes Indexes
  27. </Directory>
  28. </VirtualHost>
  29. <VirtualHost *:80>
  30. DocumentRoot "/var/www/html/dev/mysite.com/"
  31. ServerName dev.mysite.com
  32. # ServerAlias mysite.com
  33. <Directory />
  34. allow from all
  35. Options +Indexes
  36. </Directory>
  37. </VirtualHost>
  38. <VirtualHost *:80>
  39. ServerName dev.admin.mysite.com
  40. AllowEncodedSlashes On
  41. ErrorDocument 404 /error/404.php
  42. DocumentRoot "/var/www/html/dev/admin.mysite.com"
  43. <Directory />
  44. allow from all
  45. Options ExecCGI FollowSymLinks Includes Indexes
  46. </Directory>
  47. </VirtualHost>
  48. <VirtualHost *:80>
  49. ServerName dev.services.mysite.com
  50. ErrorDocument 404 /error/404.php
  51. DocumentRoot "/var/www/html/dev/services.mysite.com"
  52. <Directory />
  53. allow from all
  54. Options ExecCGI FollowSymLinks Includes Indexes
  55. </Directory>
  56. </VirtualHost>
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 56 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.