Here's another approach for evaluating the one without the $x$ in front.
First notice that it's equivalent to showing that $$\int_{0}^{\pi /6} \log^{2}(2 \sin x) \ dx = \frac{7 \pi^{3}}{216}. $$
Using the principal branch of the logarithm and assuming that $0 < x < \pi$, we have $$ \begin{align} \log(1-e^{2ix}) &= \log (e^{-ix}-e^{ix}) + \log(e^{ix}) \\ &= \log(-2i \sin x) + ix \\ &= \log(2 \sin x) - \frac{i \pi}{2} + ix. \end{align}$$
Squaring both sides and integrating, $$\int_{0}^{\pi /6} \left(\log(2 \sin x) - \frac{i \pi}{2} + ix \right)^{2} \ dx = \int_{0}^{\pi /6} \log^{2} (1-e^{2ix}) \ dx . $$
Then equating the real parts on both sides of the equation, we get
$$\begin{align} \int_{0}^{\pi /6} \log^{2}(2 \sin x) \ dx &= \int_{0}^{\pi/6} \left(x- \frac{\pi}{2} \right)^{2} \ dx + \text{Re} \int_{0}^{\pi /6} \log^{2}(1-e^{2ix}) \ dx \\ &= \frac{19 \pi^{3}}{648} +\text{Re} \int_{C} \log^{2}(1-z) \frac{dz}{2iz} \\ &=\frac{19 \pi^{3}}{648} + \frac{1}{2} \ \text{Im} \int_{C} \frac{\log^{2}(1-z)}{z} \ dz \end{align}$$
where $C$ is the portion of the unit circle from $z=1$ to $z=e^{ \pi i /3}$.
But since $\frac{\log^{2}(1-z)}{z}$ is analytic for $\text{Re}(z) <1$,
$$ \begin{align} \int_{C} \frac{\log^{2}(1-z)}{z} \ dz &= \int_{1}^{e^{\pi i /3}} \frac{\log^{2}(1-z)}{z} \ dz . \end{align} $$
Then integrating by parts twice, we get
$$ \begin{align} \text{Im} \int_{1}^{e^{\pi i /3}} \frac{\log^{2}(1-z)}{z} \ dz &= \text{Im} \ \log^{2}(1-z) \log(z) \Bigg|^{e^{\pi i /3}}_{1} + 2 \ \text{Im} \int_{1}^{e^{\pi i /3}} \frac{\log(1-z) \log (z)}{1-z} \ dz \\ &= \text{Im} \ \log^{2}(e^{-\pi i /3}) \log(e^{\pi i /3}) + 2 \ \text{Im} \ \log(1-z) \text{Li}_{2}(1-z) \Bigg|^{e^{\pi i / 3}}_{1} \\ &+ 2 \ \text{Im} \int_{1}^{e^{\pi i / 3}} \frac{\text{Li}_{2}(1-z)}{1-z} \ dz \\ &=- \frac{ \pi^3}{27} - \frac{2 \pi }{3}\text{Im} \ i \ \text{Li}_{2} (e^{- \pi i /3}) - 2 \ \text{Im} \ \text{Li}_{3}(1-z) \Bigg|^{e^{\pi i/3}}_{1} \\ &= - \frac{ \pi^3}{27} - \frac{2 \pi }{3}\text{Im} \ i \ \text{Li}_{2} (e^{- \pi i /3}) - 2 \ \text{Im} \ \text{Li}_{3}(e^{ -\pi i /3}) \\ &= - \frac{\pi^3}{27} - \frac{2 \pi }{3} \sum_{n=1}^{\infty} \frac{\cos (n \pi /3)}{n^{2}} +2 \sum_{n=1}^{\infty} \frac{\sin (n \pi /3)}{n^3}. \end{align}$$
Integrating both sides of the Fourier series $$\sum_{k=1}^{\infty} \frac{\sin (k \theta)}{k} = \frac{\pi - \theta}{2} \ , \ 0 < \theta < 2 \pi$$
we get
$$\sum_{k=1}^{\infty} \frac{\cos (k \theta)}{k^{2}} = \frac{\theta^{2}}{4} - \frac{\pi \theta}{2} + \frac{\pi^{2}}{6} .$$
And integrating a second time, $$ \sum_{k=1}^{\infty} \frac{\sin (k \theta)}{k^{3}} = \frac{\theta^{3}}{12} - \frac{\pi \theta^{2}}{4} + \frac{\pi^{2} \theta}{6}.$$
Therefore,
$$\sum_{n=1}^{\infty} \frac{\cos (n \pi /3)}{n^{2}} = \frac{\pi^{2}}{36} $$
and $$ \sum_{n=1}^{\infty} \frac{\sin (n \pi /3)}{n^{3}} = \frac{5 \pi^{3}}{162}. $$
So finally we have
$$ \begin{align} \int_{0}^{\pi /6} \log^{2}(2 \sin x) \ dx &= \frac{19 \pi^{3}}{648} + \frac{1}{2} \left[ - \frac{ \pi^{3}}{27} - \frac{2 \pi }{3} \left(\frac{\pi^{2}}{36} \right) + 2 \left( \frac{5 \pi^{3}}{162} \right) \right] \\ &= \frac{7 \pi^{3}}{216} . \end{align}$$