maintenance.html switch and css
Posted by: stefanw1337 (---.211.174.108.getinternet.no)
Date: April 25, 2016 12:00PM

So I sat up maintenance switch with the maintenance.enable thing, and set it up to look like my regular site(and it worked at the start of things), but all of a sudden the css no longer worked. I opened the page myself and everything looks OK to me(and also if I go to my site.com/maintenance.html it works fine, but via the switch itself it doesn't work. So I tried the other way of doing css for that page only, and that is with the inline code in the html itself. That kind of worked. But now that doesn't work either. The color of the background and text is the only thing that changes.

And I tried then going normalize.css but no, nothing makes it work again. So do I have to reinstall it? Anyone else had trouble with this? And it's ONLY via the switch, css on index.html works like a charm.

Halp?



Edited 1 time(s). Last edit at 04/25/2016 12:02PM by stefanw1337.

Options: ReplyQuote
Re: maintenance.html switch and css
Posted by: Otomatic (Moderator)
Date: April 25, 2016 02:44PM

Hi,

- 1 - READ BEFORE YOU ASK A QUESTION

- 2 - What is the question ?

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: maintenance.html switch and css
Posted by: stefanw1337 (---.211.174.108.getinternet.no)
Date: April 26, 2016 05:38PM

Otomatic Wrote:
-------------------------------------------------------
> Hi,
>
> - 1 -
> [url=http://forum.wampserver.com/read.php?2,129067
> ]READ BEFORE YOU ASK A QUESTION[/url]
>
> - 2 - What is the question ?


1 - Windows version used (Specify version number AND whether 32 or 64 bit)
Windows 10

2 - Version WampServer (Specify version number AND whether 32 or 64 bit)
On the About it says:
WampServer Version 3.0.0 64bit
Created by Romain Bourdon
Maintainer / Upgrade to 2.5 by Herve Leclerc
Upgrade 2.5 to 3.0.0 by Otomatic (wampserver@otomatic.net)
Multi styles for homepage by Jojaba
Installer by Inno Setup
[url]http://forum.wampserver.com/index.php[/url]

3 - Apache Version
Folder called apache2.4.17

4 - PHP Version
Two folders called php7.0.0 and php5.6.16
5 - MySQL Version
Folder is called mysql5.7.9

6 - What color is the WampServer icon (in the notification area of the taskbar)
Green, therefor skipping question 7.

8 - Do you have access to localhost (Homepage WampServer)?
No this was removed with the Virtual Host that I sat up. But the actual homepage works at localhost:<port>, yes. And as described, it will use css on my index.html, and used to do it with maintenance.html as well, but not anymore. The page itself with css will work with localhost:<port>/maintenance.html, just when the maintenance.enabled is there it looks like crap.

9 - Do you have access to phpMyAdmin?
localhost:<port>/phpmyadmin does not work, no. Will direct me to the actual maintenance.html when
maintenance.enabled is there. Otherwise: "You don't have permission to access /phpmyadmin on this server."

10 - If you refer to an error message, please include the EXACT wording of the error in your post
No error messages.
11 - If you use an Antivirus and / or Firewall, please include the names of these
Only Microsft Essencial Security "normal" windows protection.
12 - What is the full path to the installation of WampServer (eg D:\wamp\)
F:\wamp64

My question is: Why doesn't css no longer work for the maintenance.html when it's identical to index.html with slightly different text in it? And why doesn't it work when the maintenance.enabled is present, but work otherwise? (like opened locally or with the full address to the file)



Edited 4 time(s). Last edit at 04/26/2016 05:42PM by stefanw1337.

Options: ReplyQuote
Re: maintenance.html switch and css
Posted by: Otomatic (Moderator)
Date: April 26, 2016 06:00PM

Hi,

> 8 - Do you have access to localhost (Homepage WampServer)?
> No this was removed with the Virtual Host that I sat up.
This is the first thing you have to solve. Not having access to localhost means that changes you made to create your VirtualHost were poorly made. See The need for Virtual Host.
And with Wampserver 3, there is a tool for creating or adding VirtualHost and this, without errors : Wampserver 3 - Create or add a VirtualHost

You should not change the port used by Apache. This is the defined port for the HTTP protocol. If another application uses port 80, this is the application you must either modify or delete. See points # 03 and 08 of TROUBLESHOOTING TIPS

As long as you do not have normal access to "localhost", it's not worth trying to correct other problems. This means that the changes you made are not good.

What are "maintenance.html", "index.html" you speak of? Theses files are not part of Wampserver.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: maintenance.html switch and css
Posted by: stefanw1337 (---.211.174.108.getinternet.no)
Date: April 28, 2016 04:46PM

Well, the http;//localhost:<port> works, but it doesn't give the WampServer homepage as it used to do(you know wiht all the documentaion), and I don't want it to show that homepage either. And for port 80 I don't use that on my site. I have a portforwarding for port 80 to go to my other port for the program that I run for the site itself, so that solves the port 80 thing entirely.

And I did follow a virtualhost guide, not one from these forums.

Do I still need to include the section with:
<VirtualHost *:80>
eventho my server is using another port?

"Wampserver 3 - Create or add a VirtualHost", there I have localhost only.
My virtual host looks kinda like this atm:

<VirtualHost *:<port>>

RewriteEngine On
#RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.000
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
RewriteCond %{DOCUMENT_ROOT}/maintenance.enable -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /maintenance.html [R=503,L]
ErrorDocument 503 /maintenance.html
Header Set Cache-Control "max-age=0, no-store"


ServerAdmin my-email

ServerName localhost <--I assume this is what the wampserver reads in the virtual host menu?
ServerAlias server.url-address.com

ErrorLog "logs/server.url-address.com-error.log"

CustomLog "logs/server.url-address.com-access.log" common

DocumentRoot /wamp64/www
<Directory />
Options FollowSymLinks
AllowOverride None
Allow from all
</Directory>
<Directory /wamp64/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

ScriptAlias /cgi-bin/ /wamp64/cgi-bin/
<Directory "/wamp64/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

</VirtualHost>

Do you see anything wrong with this VirtualHost tho? I mean, everything works as I want it to, except that maintenance.html doesn't wanna get css, not even inline(it used to)..

Do you think VirtualHost thing is affecting the maintenance switch that I made, that it and only it won't use css?

So that's where the maintenance.html and index.html come in as files for the apache server itself(which I mainly have for the maintenance switch only, the index will just redirect the user to the site with the port. Now these files might not be a part of wampserver itself, it's a part of the apache which is a part of the wampserver. So it's indirectly a part of wampserver.



Edited 3 time(s). Last edit at 04/28/2016 04:48PM by stefanw1337.

Options: ReplyQuote
Re: maintenance.html switch and css
Posted by: Otomatic (Moderator)
Date: April 28, 2016 05:04PM

Hi,

Please, do what you are asked and no two things simultaneously and anyhow.

Start by Wampserver operate normally without changing the port, without changing anything, with access to the home page of Wampserver (localhost) and phpMyAdmin and only after that you can add your local site as VirtualHost.

But if you want to do everything together, mixing everything without following a proven methodology, you will not do any good and it will not work.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.