文廟(miao)(miao)始(shi)建于1477年,位(wei)于桂林市恭城縣西(xi)山南麓,是廣(guang)西(xi)保存較為完整的孔廟(miao)(miao),也是自治區重點文物保護單(dan)位(wei)。文廟(miao)(miao)是為祭祀我(wo)國古代政(zheng)治家(jia)(jia)、思想家(jia)(jia)和(he)教育家(jia)(jia)孔子而(er)建的圣廟(miao)(miao)。
文廟(miao)坐北朝南(nan),南(nan)偏東6度,俯視(shi)茶江,背(bei)靠印山,依山而建(jian),逐層布置,顯得莊嚴(yan)肅穆。全廟(miao)占地3600平方米,建(jian)筑(zhu)面積1300平方米。由兩邊耳門(men)(men)(men)出(chu)入(ru),東向門(men)(men)(men)叫禮門(men)(men)(men),西向門(men)(men)(men)叫義路,門(men)(men)(men)外立禁(jin)碑一塊(kuai),上刻“文武官(guan)員至此下馬”,以示孔廟(miao)的莊嚴(yan)。正面是照壁(bi),沒有開大(da)門(men)(men)(men),據(ju)說等(deng)有人中(zhong)了狀元,才在照壁(bi)中(zhong)間開大(da)門(men)(men)(men),稱(cheng)狀元門(men)(men)(men),想從大(da)門(men)(men)(men)步(bu)入(ru)欞星門(men)(men)(men),唯狀元莫(mo)屬。
新中國成(cheng)立(li)后(hou),為(wei)方(fang)(fang)(fang)便(bian)群眾游覽,把狀元(yuan)門(men)(men)(men)(men)打開(kai)了(le)。欞(ling)(ling)(ling)星門(men)(men)(men)(men)相(xiang)傳是(shi)(shi)漢(han)高(gao)(gao)祖命祀欞(ling)(ling)(ling)星而移用于孔廟(miao),以(yi)(yi)尊天者尊孔為(wei)本意。該(gai)門(men)(men)(men)(men)全部青石(shi)砌筑(zhu),上(shang)(shang)(shang)面刻(ke)有“欞(ling)(ling)(ling)星門(men)(men)(men)(men)”三個大(da)字,還有雙(shuang)龍戲(xi)珠、雙(shuang)鳳(feng)朝陽等浮(fu)雕(diao)。欞(ling)(ling)(ling)星門(men)(men)(men)(men)的(de)(de)(de)(de)六根大(da)石(shi)柱(zhu)頂(ding)端有六只小石(shi)獅互(hu)相(xiang)窺視著。過了(le)欞(ling)(ling)(ling)星門(men)(men)(men)(men)便(bian)是(shi)(shi)泮池(chi),又叫(jiao)月池(chi),料石(shi)砌就,周圍以(yi)(yi)青石(shi)為(wei)欄,有石(shi)拱橋(qiao)跨過池(chi)面,稱狀元(yuan)橋(qiao),意為(wei)狀元(yuan)才能通過,橋(qiao)面有一塊刻(ke)有云(yun)紋(wen)浮(fu)雕(diao)的(de)(de)(de)(de)青石(shi),為(wei)“青云(yun)直上(shang)(shang)(shang)”之(zhi)意。由欞(ling)(ling)(ling)星門(men)(men)(men)(men)步上(shang)(shang)(shang)兩層平(ping)臺(tai),便(bian)是(shi)(shi)大(da)成(cheng)門(men)(men)(men)(men)。大(da)成(cheng)門(men)(men)(men)(men)由十(shi)一扇(shan)木門(men)(men)(men)(men)組成(cheng),木質結構(gou),門(men)(men)(men)(men)扇(shan)上(shang)(shang)(shang)樓空的(de)(de)(de)(de)花(hua)鳥蟲魚(yu)雕(diao)刻(ke),栩栩如生。大(da)成(cheng)門(men)(men)(men)(men)東面是(shi)(shi)名宦(huan)祠,西面是(shi)(shi)鄉賢祠,是(shi)(shi)供奉(feng)(feng)歷代先賢、先儒的(de)(de)(de)(de)地方(fang)(fang)(fang),計有一百四十(shi)三個靈位。大(da)成(cheng)門(men)(men)(men)(men)后(hou)面是(shi)(shi)天井,前有寬大(da)的(de)(de)(de)(de)平(ping)臺(tai),叫(jiao)杏壇,又叫(jiao)露(lu)壇,傳說是(shi)(shi)孔子講(jiang)學的(de)(de)(de)(de)地方(fang)(fang)(fang)。露(lu)壇之(zhi)上(shang)(shang)(shang)是(shi)(shi)大(da)成(cheng)殿,為(wei)文(wen)廟(miao)的(de)(de)(de)(de)主體(ti)建(jian)筑(zhu),面闊五間,進深(shen)三間,有磚柱(zhu)十(shi)根,木柱(zhu)十(shi)八根,大(da)門(men)(men)(men)(men)十(shi)四扇(shan),門(men)(men)(men)(men)窗、檐(yan)(yan)口均飾以(yi)(yi)木雕(diao)。屋面飛檐(yan)(yan)高(gao)(gao)翹,重(zhong)檐(yan)(yan)歇山,脊施(shi)花(hua)飾,泥塑彩畫(hua),琉璃瓦蓋,金碧(bi)輝煌。大(da)成(cheng)殿正(zheng)中的(de)(de)(de)(de)神龕是(shi)(shi)供奉(feng)(feng)孔子靈牌的(de)(de)(de)(de)地方(fang)(fang)(fang)。大(da)成(cheng)殿之(zhi)后(hou)是(shi)(shi)崇(chong)圣祠,是(shi)(shi)供奉(feng)(feng)孔子五代祖先的(de)(de)(de)(de)殿堂(tang),崇(chong)圣祠與大(da)成(cheng)殿在建(jian)筑(zhu)構(gou)造上(shang)(shang)(shang)很講(jiang)究,大(da)小高(gao)(gao)低有分別。
歷(li)代每歲春仲月(農(nong)歷(li)二(er)、八月),在大殿舉(ju)行祭(ji)禮(li)(li)。祭(ji)期(qi)黎(li)明,各官衣朝服,按序(xu)而立,齊集行禮(li)(li),典儀極為隆重。
據資料記載(zai),道光二十(shi)二年(nian)(nian)(1842年(nian)(nian)),有人認(ren)為(wei)原廟室規(gui)模小,出不了狀元,于是官府派遣王雁洲(zhou)、莫勵堂(tang)兩(liang)位舉人到(dao)山(shan)東曲阜參(can)觀(guan)孔廟,以曲阜孔廟為(wei)模式設計繪圖(tu),籌集巨款(kuan),并從廣東、湖南等地(di)請來工匠重(zhong)(zhong)建(jian),歷時(shi)兩(liang)年(nian)(nian)余始告(gao)竣工,成為(wei)廣西較大(da)的(de)孔廟。清咸豐四年(nian)(nian)(1854年(nian)(nian))又毀于兵燹,清咸豐十(shi)一年(nian)(nian)(1861年(nian)(nian))重(zhong)(zhong)新修復。以后曾修葺二十(shi)多次(ci)。1963年(nian)(nian)廣西壯族(zu)自治區(qu)人民政府撥款(kuan)維修,并列為(wei)自治區(qu)重(zhong)(zhong)點(dian)文物保(bao)護單位。