# Use the solipsist01/rapidleech image as the base FROM solipsist01/rapidleech:latest # Install necessary tools to modify configuration RUN apt-get update && apt-get install -y nano # Enable Apache headers module to control X-Frame-Options RUN a2enmod headers # Modify the Apache configuration to listen on port 7860 RUN sed -i 's/80/7860/g' /etc/apache2/ports.conf && \ sed -i 's/80/7860/g' /etc/apache2/sites-available/000-default.conf # Add X-Frame-Options header directly to the 000-default.conf file RUN sed -i '/<\/VirtualHost>/i \n Header always unset X-Frame-Options\n Header always set X-Frame-Options "ALLOWALL"\n' /etc/apache2/sites-available/000-default.conf # Restart Apache to apply the configuration RUN service apache2 restart # Ensure the same configuration in the main apache2.conf for redundancy RUN echo '\n Header always unset X-Frame-Options\n Header always set X-Frame-Options "ALLOWALL"\n' >> /etc/apache2/apache2.conf # Expose the new port EXPOSE 7860 # Restart Apache again to ensure all settings are applied CMD ["apache2-foreground"]