private void createAllWebserverConfigs() throws IOException {

        List<CmsSite> sites = OpenCms.getSiteManager().getAvailableSites(getCms(), true);
        for (CmsSite site : sites) {
            if ((site.getSiteMatcher() != null) && site.isWebserver()) {

                String filename = m_targetPath
                    + m_filePrefix
                    + "_"
                    + generateWebserverConfigName(site.getSiteMatcher(), "_");
                getReport().println(
                    Messages.get().container(Messages.RPT_CREATING_CONFIG_FOR_SITE_2, filename, site),
                    I_CmsReport.FORMAT_OK);
                File newFile = new File(filename);
                if (!newFile.exists()) {
                    newFile.getParentFile().mkdirs();
                    newFile.createNewFile();
                }

                String content = createConfigForSite(site, FileUtils.readFileToString(new File(m_templatePath)));
                if (site.hasSecureServer()) {
                    content += createConfigForSite(site, FileUtils.readFileToString(new File(m_secureTemplate)));
                }

                FileUtils.writeStringToFile(newFile, content);
                m_writtenFiles.add(newFile.getAbsolutePath());
            }
        }
    }
private void createAllWebserverConfigs ( ) throws IOException { List < CmsSite > sites = OpenCms . getSiteManager ( ) . getAvailableSites ( getCms ( ) , true ) ; for ( CmsSite site : sites ) { if ( ( site . getSiteMatcher ( ) != null ) && site . isWebserver ( ) ) { String filename = m_targetPath + m_filePrefix + "_" + generateWebserverConfigName ( site . getSiteMatcher ( ) , "_" ) ; getReport ( ) . println ( Messages . get ( ) . container ( Messages . RPT_CREATING_CONFIG_FOR_SITE_2 , filename , site ) , I_CmsReport . FORMAT_OK ) ; File newFile = new File ( filename ) ; if ( ! newFile . exists ( ) ) { newFile . getParentFile ( ) . mkdirs ( ) ; newFile . createNewFile ( ) ; } String content = createConfigForSite ( site , FileUtils . readFileToString ( new File ( m_templatePath ) ) ) ; if ( site . hasSecureServer ( ) ) { content += createConfigForSite ( site , FileUtils . readFileToString ( new File ( m_secureTemplate ) ) ) ; } FileUtils . writeStringToFile ( newFile , content ) ; m_writtenFiles . add ( newFile . getAbsolutePath ( ) ) ; } } }
Creates the new web server configuration files from the given template file.<p>

@throws IOException if something goes wrong