Using a state-of-the-art numerical method density-matrix renormalization-group, we study the ground states of one-dimensional spinless Bose-Hubbard model inside a red-detuned cavity. By calculating the superfluid order, density distribution, second and third-order correlation functions, we find that there exist two novel supersolid phases with diagonal, off-diagonal orders beyond mean-field theory. One has package type density modulation along the lattice axis, another exhibits uniform density distribution. Moreover, by calculating the superradiant order parameter and the number of photon inside the cavity, we find that the novel supersolid phases are highly related to cavity-field fluctuation. Our work gives the physics beyond the mean-field theory of the Bose-Hubbard model inside an optical cavity, and provides the complete approach to fully explore the collective state of light and matter inside an optical cavity.