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